Showing posts from September, 2012

How to install ruby, rubygems and libyaml

Following are the commands which can be used to install the ruby with rubygems and libyaml:

To install ruby use the following commands:
wget tar -xvf ruby-1.9.3-p194.tar.gz cd ruby-1.9.3-p194 ./configure make make install ruby -v

To check if your ruby is correctly working or not create a test ruby script and run it:
vi test.rb Use the following code for test purpose:
#!/usr/bin/env ruby puts "Ruby working Fine:)" Give the ruby script execute permission and run the script to see if ruby is working fine or not:
chmod +x test.rb ./test.rb

To install rubygems use the following commands:
wget tar -xvzf rubygems-1.8.24.tgz cd rubygems-1.8.24 ruby setup.rb gem -v
If you get an error regarding the libyaml dependency, follow the following steps: