Friday, January 02, 2009

"Killed" when running gem install or gem update

Earlier today while moving Score Keeper to a new server, I ran into a hurdle with RubyGems. When I ran the command gem install rails -v=2.2.2, I got the following response:

Bulk updating Gem source index for: http://gems.rubyforge.org
Killed

I searched Google and found a couple of suggestions, none of them helping me. It then dawned on me that it's been a while since I installed RubyGems on that server, and sure enough, gems -v reported that I was running RubyGems version 1.1.

This is easily fixed by downloading the latest version of RubyGems from http://rubyforge.org/frs/?group_id=126 which, at the time of writing, is 1.3.1. Unpack the file, go to the directory where you unpacked it and run

sudo ruby setup.rb install

This fixed the problem. YMMV, of course.