Upgrading Ruby on Ubuntu Dapper
November 2nd, 2007 by pyrat
Ubuntu Dapper will only install ruby as high as 1.8.4 which is not ideal sometimes. To upgrade an existing ruby installation to 1.8.6 do the following.
sudo apt-get install build-essential sudo apt-get install libreadline5 libreadline5-dev wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz tar -xzf ruby-1.8.6.tar.gz cd ruby-1.8.6 ./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local make sudo make install
Even if you had rubygems you need to install it and all your gems! Again.
wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz tar -xzf rubygems-1.1.1.tgz cd rubygems-1.1.1 sudo ruby setup.rb
Now this is where you need to do a little fix. Openssl will not work out of the box and some application need it so you should just set it up now.
Note: If apt-get libssl-dev complains about a not found run: sudo apt-get update
sudo apt-get install libopenssl-ruby sudo apt-get install libssl-dev cd ~/src/ruby-1.8.6/ext/openssl ruby extconf.rb make sudo make install
And thats it!
January 21st, 2008 at 2:34 pm
Thanks mate, I’ve searched hard for this solution! (couldnt get openssl to work)
January 24th, 2008 at 12:07 pm
I used
ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
and
http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz
for more up to date versions
January 25th, 2008 at 3:52 am
Thanks for the concise article. A question….how did you know that openssl wouldn’t work out of the box? Thanks GT
January 25th, 2008 at 10:31 am
Hey GT,
I installed it and then found that openssl wasnt working!
May 13th, 2008 at 8:54 am
thanks for this Al. funny place to find you…