Blog An exploration of the art and
craft of software development

Upgrading Rubygems

Posted by Marty Haught on Friday, May 02, 2008

This week I’ve been spending much of my free time getting the release of my new Radiant extension wrapped up. I’m in the final stages of that right now so expect a post soon on those details. So as part of this process I wanted to install the new extension on an external facing Radiant system, such as Boulder Ruby. I’ll reference it so people can see it in action. In order to do this I need to upgrade several things. First, I need to upgrade BoulderRuby to Radiant 6.6. Radiant 6.6 is built on Rails 2.0 and also needs the newer version of Rubygems. No problem, right? Well it turned out not to be so!

So I tried to simply update the Radiant gem. I tried multiple times but it hung on me. More specifically it got to this line and just stayed there, forever (well, until I killed it).

Bulk updating Gem source index for:

Usually, it might take 5-15 seconds or so for this line on my development system. I wasn’t sure what was happening so I decided to skip the gem install and just manually bring up a tarball of my local BoulderRuby radiant upgrade. Fine except I could run rake as it needed a newer version of Rubygems. Updating Rubygems also hung on the same command. wtf?!?

I then manually upgrade Rubygems as I wanted to be on the newest release after going through all the trouble of updating my system. Then moved on to upgrading Rails which Radiant needs. Then Rails was hanging on the bulk updating line. By this point Slicehost is emailing me telling my server has been going heavy into swap. After some googling it appears that my issue may be the 256 MB Ram limit my meager slice has. Yikes! I was able to install and update gems before, what’s the deal now?

So I got around this by manually pulling down the gem files and installing with this command:

sudo gem install --ignore-dependencies --local activeresource-2.0.2.gem

It took me several tries to get to this workable solution. Rubygems doc doesn’t really talk about how to use all the options available and several different combos still got stuck on the bulk updating line. I’m guessing that upgrading my slice’s memory to 512 might make the difference but that just seems wrong.

blog comments powered by Disqus