Saturday, July 31, 2010

How to install the Ruby gem command

I hunted around for this for a surprising time and decided to post it here, because I couldn't find one place that said, "This is how you do it!"

To install the Ruby gem command on your Linux system:

1. For Ruby 1.8.5 or less, download rubygems-1.3.5.tgz:
      pushd ~/Downloads
      wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz


2. Unpack it in /var/tmp:
      pushd /var/tmp
      tar -zxf ~/Downloads/rubygems-1.3.5.tgz


3. Run setup.rb as root:
      pushd /var/tmp/rubygems-1.3.5
      sudo ruby setup.rb --no-ri --no-rdoc


That will do it! Now you can use gem to get lots of other useful Ruby packages :-)

No comments:

Post a Comment