This howto guide is based on ruby version 1.8.4 which was the current version at the time of writing this guide.
Download the ruby source code from: http://www.rubyonrails.org/down
Extract the .tar.gz file to a suitable location:
cd /usr/src
tar zxvf /usr/local/src/ruby-1.8.4.tar.gz
Run the configure command:
./configure --prefix=/usr --sysconfdir=/etc --enable-shared --enable-install-doc
Now compile the program:
make
Run the test suite:
make test
You should receive a: “test succeeded” output.
Finally, install ruby:
make install
Your done. You should now have a valid ruby interperter running on your server.