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.rbThe gem binary is now installed:
/usr/bin/gem1.8If you want to have
gempoint to the 1.8 binary:
sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1Next, run a gem system update to be sure you are on the latest version:
sudo gem update --systemRubygems should now be installed and ready to go.