Languages

ruby

MauricioVieira's picture

Updating rubygems on ubuntu 10.04

I use an Ubuntu 10.04 box at work, and needed a newer rubygems installation.

Borrowing instructions from Ascarter and changing version (1.3.6 to 1.8.7):

When I build from source and install to the system, I prefer to put the source in /usr/local/src.
But feel free to install anywhere you like. To install rubygems, you
need to download the latest tarball. As of this writing, it is 1.8.7.
Then extract the archive and install:

cd /usr/local/src

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.7.tgz

tar xzvf rubygems-1.3.6.tgz

cd rubygems-1.3.6

sudo ruby setup.rb

The gem binary is now installed:

/usr/bin/gem1.8

If you want to have gem point to the 1.8 binary:

sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1

Next, run a gem system update to be sure you are on the latest version:

sudo gem update --system

Rubygems should now be installed and ready to go.

Syndicate content