Updating ruby to version 1.9.1 in ubuntu 8.04

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.

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar -xzvf ruby.19.1-p243.tar.gz
cd ruby1.9.1-p243
make install

if getting errors like so:

cd ruby.19.1-p243/ext/readline
ruby extconf.rb
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.

Like it.? Share it:

Comments are closed.