Sane Ruby on Hardy

Recently, there have been a few happenings in Ruby land that break things a bit on Ubuntu Hardy.

Firstly, there were two rounds of security vulnerabilities. This doesn’t break things per se, however there’s been a significant lag time between the Ruby team patching it and Ubuntu releasing updated packages.

Secondly, the RubyGems team pushed a new backwards incompatible release that changed the metadata format that Gem repositories use. The gems published on gems.rubyforge.org pretty much stopped working after that, leaving people running RubyGems < 1.2.0 (almost everyone) out in the cold. And by “out in the cold” I mean they couldn’t install gems, and the gem command would consume all available memory.

The supplied rubygems-update-1.2.0.gem doesn’t work on Ubuntu because of the way RubyGems is packaged, and the plain old gem update doesn’t work due to metadata incompatibilities, making it reasonably impossible to fix unless you install from source or find some magical packages.

Fortunately, the ubuntu-ruby team have created these magical packages. There are two repos, ubuntu-ruby & ubuntu-ruby-backports. Backports is recommended as being more stable, however i’ve been running the ‘bleeding edge’ repo the last month without any problems.

Choose the repo you want, and add it to your /etc/apt/sources.list

deb http://ppa.launchpad.net/ubuntu-ruby/ubuntu hardy main
deb http://ppa.launchpad.net/ubuntu-ruby-backports/ubuntu hardy main

one apt-get update && apt-get upgrade later and you’ll have updated package goodness.