Programmer’s Notebook – Ruby

I’ve been using MacOS as my desktop and development environment for the past 19 years. Whenever I got a new laptop, I’d use the migration assistant to copy my user settings over. So, I’ve got a lot of cruft in my home directory. Over that time I mostly did Java programming. But, there’s also been a bit of Perl, and I dabbled in Python for a hot second. More recently, it’s been Flutter, and most recently of all, Swift. And last OS update switched me from bash to zsh, so there’s just a huge .zshrc in my home directory. Oh yeah, and I came to OS X from FreeBSD by way of Linux, so before Homebrew won, I mostly used ports to install stuff.

So today: fastlane. It’s cool, it promises to automate some vital yet tedious tasks, most especially taking screenshots for the app store. That’s great, but it’s ruby. Ruby ships with Mac OS, but that’s kind of down-rev and the latest packages don’t like it. I have never done ruby programming, but I’ve installed tools (which ones? when? who can remember?) that required it and so there were weird traces of a ruby version manager, and maybe some kind of gem manager, so that fastlane couldn’t admit that it was completely installed or runnable or that maybe snapshots were even a thing, or that, hey, is ruby even installed on this computer?

After I kid you not, 14 solid hours of trying things that worked but broke other stuff, I’ve finally got fastlane to admit that it works.

  1. Some tool needed to be removed entirely. rvm? rbenv? Dunno, but I had to invoke it with implode which made me feel a little better.
  2. Everyone in the world thinks that ruby version 3.0.0 is the thing to use. Except fastlane, which wants to use rexml, which is no longer bundled with ruby 3.0.0. There was something else broken with version 3, but I can’t remember what it was — it was way harder to solve than just installing rexml. Anyway, stick to version 2.7.2. Oh yeah, bundle couldn’t resolve ruby version dependencies.
  3. Homebrew says that rbenv, which delegates to ruby-build, installs openssl 1.1 but doesn’t ever patch it and it does so per ruby environment. So, if you want a patched openssl and you only want one instead of however many ruby versions you’ve got, you should provide a compiler flag to tell ruby-build about the Homebrew version. Don’t do this, because ruby won’t compile.

Published by pirateguillermo

I play the bagpipes. I program computers. I support my family in their various endeavors, and I enjoy my wonderful life.

4 thoughts on “Programmer’s Notebook – Ruby

    1. Thanks for the pointer — I’ll take a look. Although honestly, most of the shell rc file has to do with adding paths and manipulating environment variables and very little to do with customizing what the terminal window looks like. (Hint: I don’t like having a black window!)

      1. Themes? Whatever.
        Having tab completion for all the args for find, ls, docker, tab completion for make targets? tab completion for ssh targets? Freakin awesome.

  1. Oh, you’re not wrong, there. My current solution is an aliases file, because what super genius decided that it’s better to type, “bundle exec fastlane screenshot” than to type, “fastlane screenshot” or even “fl -s”. Anyway, yeah, tab completion of all these things would be awesome.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: