Understand, Learn and Implement.. LINUX / UNIX DEVOPS CONTAINERS OPENSHIFT KUBERNETES DEVOPS TOOLS VIRTUALIZATION STORAGE BACKUP SCRIPTS MONITORING MIDDLEWARE

Monday, December 15, 2014

Install Ruby 1.9.3 and Rubygems 1.8.24 on Centos 6

Ruby is an object-oriented programming language that is similar in syntax to Perl and Python. The version of Ruby that ships with CentOS 6.2 is 1.8.7. If you need the latest version, you can download, compile and install Ruby from source code. This is a quick tutorial on installing Ruby 1.9.3 and Rubygems 1.8.24 on CentOS 6.2 from source.
Make sure your operating system packages are up to date by executing the following command:
yum update -y
In order to have all the proper dependencies installed, execute the following command:
yum groupinstall "Development Tools"
Then, follow the steps described below:
cd /root/
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz

tar xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
./configure
make
make install
Once the install is complete, verify the version of Ruby:
ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410)
Update to the latest RubyGems version (RubyGems is a sophisticated package management framework for Ruby.):
cd /root/
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
tar xvzf rubygems-1.8.24.tgz
cd rubygems-1.8.24
ruby setup.rb
Verify the version of RubyGems:
gem --version
1.8.24
Ensure you have the latest gem versions:
gem update --system
Install the Rake build language (Rake is a build tool written in Ruby, similar to make):
gem install rake
Install all of Rails and its dependencies:
gem install rails
List the installed gems:
gem list
That’s it! You now have a full Ruby on Rails stack up on CentOS 6.2.
Sometimes, you may get error due to no package for yaml..
AT that time,follow these steps,
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure
$ make
$ sudo make install

0 comments:

Post a Comment