juretta.com

Install Ruby 1.8.5 on Debian Sarge (3.1)

October 14, 2006
Tags: Debian

Unfortunately there is no easy way to install Ruby 1.8.(4|5) on Debian Sarge (stable). Here is how to install Ruby 1.8.5 on Debian Sarge stable:

Add deb-src http://ftp.debian.org/debian/ unstable main to /etc/apt/sources.list

Run apt-get update.

You can copy the following lines to install a recent 1.8.5 Ruby installation (including ri, rdoc, irb and rake)
apt-get source ruby1.8
apt-get build-dep ruby1.8
apt-get install devscripts
cd ruby1.8-1.8.5
debuild -us -uc
cd ..

# Rake
apt-get source rake
apt-get build-dep
cd rake-0.7.1
debuild -us -uc
cd ..

# I had to remove ruby1.8-elisp_1.8.5-2_all.deb. Might work for you
rm ruby1.8-elisp_1.8.5-2_all.deb

# install the packages
dpkg --install *.deb

Check if ruby, ri, irb and rdocs are in /usr/bin.

debian31m:~# which ruby
/usr/bin/ruby
[...]

Create symlinks if all or one of the above commands is missing:

ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
ln -s /usr/bin/ri1.8 /usr/local/bin/ri
ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
ln -s /usr/bin/irb1.8 /usr/local/bin/irb
Install RubyGems the following way:
curl -O http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-0.9.0.tgz
tar xzvf rubygems-0.9.0.tgz
cd rubygems-0.9.0
/usr/local/bin/ruby setup.rb

About

This is the defunct blog of Stefan Saasen.