by andre briggs

Experiences Updating Ruby on Mavericks

I recently updated the version of Ruby I was using on my Mac. My true impetus was the desire to get footnotes1 working on the Octopress blogging platform I use for this blog. I’m still relatively new to Git and Ruby since I don’t use them in my professional work.


After looking at the Octopress source code I found that a gem named RDiscount that seemed to perform the interpretation of Markdown syntax. In Ruby packages are called gems.

I simply needed a more up-to-date version of RDiscount that supported footnotes. My first thought was to use git to pull a new version of the package and update the dependency graph.

Octopress uses a gem called Bundler which provides an encapsulation for the dependency of gems among other things. I had already known of Jekyll and Sass but it was refreshing to see just how declarative the the dependencies were. When I first set up this blog I didn’t really take the time to understand all the components Octopress leans on.

Here’s a snippet of what the dependency tree looks like:

jekyll (0.12.1)
      classifier (~> 1.3)
      directory_watcher (~> 1.1)
      kramdown (~> 0.14)
      liquid (~> 2.3)
      maruku (~> 0.5)
      pygments.rb (~> 0.3.2)
    kramdown (0.14.2)
    liquid (2.3.0)
    maruku (0.7.0)
    posix-spawn (0.3.8)
    pygments.rb (0.3.7)
      posix-spawn (~> 0.3.6)
      yajl-ruby (~> 1.1.0)
    rack (1.5.2)
    rack-protection (1.5.1)
    rake (0.9.6)
    rb-fsevent (0.9.4)
    rdiscount (

I had originally set up Octopress over a year ago any hadn’t touched any of the source code outside of customizations. The project was woefully out of date. I used the command

gem install rdiscount -v '2.1.7'

to update. Of course it failed citing dependency issues. Updating those dependencies failed with cryptic error messages so I said “fuck it, let me update Ruby to 2.*!”.


Looking over the Octopress instructions I attempted to use the command

rvm install 2.0.0.

to get a later version of Ruby. That failed. I got here error similar to what is described here. BTW RVM is the Ruby Version Manager.

At this point I really thought I had the latest version of Xcode. The OS X AppStore said I had didn’t have any updates. Moreover I have automatic updates enabled. I logged into the Apple Developer site and saw that there is indeed a later version of Xcode so updated to 5.0.2.

I tried again now to update the Ruby but instead got a new error. This time it was something about “Can’t find Tcl configuration definitions”. After some searching I discovered that I needed to update MacPorts which I had never heard of up until that point. I read that I needed to update the package to be compatible with Mavericks.

Ok, whatever, I won’t ask why a 3rd party open source project is needed for this. Perhaps Apple doesn’t want to focus any resources on creating an “easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based” software for OS X. Fair enough.

At this point things seemed to work with the rvm command. From there I basically reinstalled Octopress and finally got an updated version of RDiscount.

Further notes.

To trim down the length of this post I skipped some of the small issues that I also encountered such as:

  • Unhelpful error messages really slow down the feedback loop.
  • GCC 4.2 didn’t exist on my machine, I had to create a symbolic link to another GCC.
  • The AppStore didn’t notify me that I didn’t have the absolutely latest version of Xcode.
  • Some Ruby gems having generic error messages.
  • I now have multiple versions of Ruby on my machine. I need to uninstall the old version.

Good luck!

  1. Exhibit A.