unfortunately, ubuntu 8.04 hardy comes with ruby version 1.8.6 by default. The latest rubygems doesn’t work well with this version. so we need to get a new version for ruby.
might want to check if you have these libraries first:
sudo apt-get install libncurses5-dev
sudo apt-get install libreadline5-dev
Download the ruby the latest source and compile it.
tar -xzvf ruby.19.1-p243.tar.gz
if getting errors like so:
sudo make install
If you have an old gem running, you can update it by
gem update --system
else you might want to visit rubygems.org to get the latest file... then extract and compile it just like before.