20 Aug 2011 fallenlord   » (Journeyer)

Upgrading RVM'd Ruby on OSX Lion

I found out the hard way that upgrading my RVM-managed Ruby 1.9.2 install to the latest patch level upstream isn't as straightforward if you had that Ruby version installed prior to an upgrade to OSX Lion. Given that OSX Lion is fully 64-bit, all libraries will have to be recompiled to 64-bit: a fact that bit me hard as all those libraries that I have installed via MacPorts and Homebrew will have to be recompiled before I can even dare upgrade Ruby.

What I did is a bit drastic, but worked for me. Any suggestions to do this better will be most welcome:

  1. Upgrade to the latest MacPorts (2.0.1 as of this writing) that is compatible with OSX Lion.
  2. Upgrade the following libraries in MacPorts or Homebrew: libiconv, libxml2, libxslt, readline, openssl, zlib. You may have to uninstall these libraries first if the compile bails out due to linkage errors between 32-bit and 64-bit libraries.
  3. Install the latest Ruby via RVM, e.g. rvm install 1.9.2-p290 --with-readline-dir=/opt/local --with-openssl-dir=/opt/local --with-iconv-dir=/opt/local --with-zlib-dir=/opt/local.

This should produce a working Ruby interpreter. Any gems previously installed though will also have to be recompiled if these are relying on a C/C++ library (e.g. Nokogiri, etc).


Syndicated 2011-08-20 21:46:00 (Updated 2011-08-25 20:47:14) from Living Core Dumps

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!