Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.
Centos 5.5 official repository is rather outdated for today so the latest Ruby available there is 1.8.6. If you need a newer version e.g. 1.8.7 you should install if from sources:
0. Install prerequisites:
sudo yum install gcc zlib zlib-devel
1. Download the latest version of Ruby from project’s FTP:
cd /usr/src/ sudo -s wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz tar -xvzf ruby-1.8.7.tar.gz cd ruby-1.8.7 ./configure --enable-pthread make make install
2. Check ruby’s version is 1.8.7:
[root@li110-222 ~]# /usr/local/bin/ruby -v ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux]
That’s it!







