Installing Ruby 1.9.1 on Linux by Source Code
How to Install Ruby 1.9.1 on Linux by Source Code
Actually, the following steps will work with any recent version of Ruby, probably.
The following instructions assume you’ll be install Ruby under /opt/local/ruby/. If you’d like it installed elsewhere, replace ‘/opt/local/ruby/’ below with your path.
login as root user
mkdir -p /opt/local/ruby
mkdir -p /opt/local/ruby/src
Download The Latest Ruby Tar Ball to obtain the URL of the tar gz file.
cd /opt/local/ruby/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar xvfz ruby-1.9.1-p243.tar.gz
./configure --prefix=/opt/local/ruby --disable-install-doc
make test (optional)
make && make install
Add the Ruby Bin Directory to your Path
Modify your PATH variable in ~/.bashrc file
export PATH=$PATH:/opt/local/ruby/bin
Installing Ruby 1.9.1 on Linux by Source Code,