Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.
Before installing Ruby on our machine we have to update our system and have to install some dependency applications.
yum -y update yum groupinstall "Development Tools"
Now we can proceed for Ruby installation
Download and install ruby as below step
cd /opt/ wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz tar xvzf ruby-2.0.0-p247.tar.gz cd ruby-2.0.0-p247 ./configure make make install
After completing the installation verify the ruby version:
ruby -v
Now we will download and install rubygem
cd /opt/ wget http://production.cf.rubygems.org/rubygems/rubygems-2.0.6.tgz tar xvzf rubygems-2.0.6.tgz cd rubygems-2.0.6 ruby setup.rb
Now we will ensure that we have the latest gem with us by issuing below command:
gem update --system
Output:
Latest version currently installed. Aborting.
Now we will install latest version of rails with it’s dependencies:
gem install rails
Verify the installed gems
gem list