Linux install RVM

RVM: Ruby Version Management
Step 1: Install Required Packages
Firstly we need to install all required packages for ruby installation on our system using following command.
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel 
# yum install libyaml-devel libffi-devel openssl-devel make 
# yum install bzip2 autoconf automake libtool bison iconv-devel
Step 2: Install RVM
Install latest stable version of RVM on your system using following command. This command will automatically download all required files and install on your system.
# curl -L get.rvm.io | bash -s stable
Step 3: Setup RVM Environment
RVM provides a shell script to setup system environment before installing Ruby. Use below command to setup rvm environment.
# source /etc/profile.d/rvm.sh
Step 4: Install Ruby
After completing setup of RVM environment, lets install Ruby language using following command.
# rvm install 2.1.2
[Sample Output]
ruby-2.1.2 - #removing src/ruby-2.1.2..
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/6/i386/ruby-2.1.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.1.2, this may take a while depending on your cpu(s)...
ruby-2.1.2 - #downloading ruby-2.1.2, this may take a while depending on your connection...
ruby-2.1.2 - #extracting ruby-2.1.2 to /usr/local/rvm/src/ruby-2.1.2...
ruby-2.1.2 - #configuring.....................................................
ruby-2.1.2 - #post-configuration.
ruby-2.1.2 - #compiling....................................................................................
ruby-2.1.2 - #installing................................
ruby-2.1.2 - #making binaries executable..
Rubygems 2.2.2 already available in installed ruby, skipping installation, use --force to reinstall.
ruby-2.1.2 - #gemset created /usr/local/rvm/gems/ruby-2.1.2@global
ruby-2.1.2 - #importing gemset /usr/local/rvm/gemsets/global.gems.............................................................
ruby-2.1.2 - #generating global wrappers.........
ruby-2.1.2 - #gemset created /usr/local/rvm/gems/ruby-2.1.2
ruby-2.1.2 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.2 - #generating default wrappers.........
ruby-2.1.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.1.2 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
Step 5: Setup Default Ruby Version
Use rvm command to setup default ruby version to be used by applications.
# rvm use 2.1.2 --default

Using /usr/local/rvm/gems/ruby-2.1.2
Step 6: Check Current Ruby Version.
Using following command you can check the current ruby version is used.
# ruby --version

ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
Congratulation’s you have successfully install Ruby on your system. Read our next article to integrate Ruby with Apache web server with easy steps.
References: 
1. http://rvm.io/rubies/installing

Error: git clone http://github.com/Snorby/snorby.git /var/www/snorby
Cloning into '/var/www/snorby'...
fatal: unable to access 'https://github.com/Snorby/snorby.git/': SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Solution export GIT_SSL_NO_VERIFY=true

Comments

Popular posts from this blog

Nginx Proxy & Load Balance & LNMP

Snort+barnyard2+Snorby CentOS 6.5_64 Installation

ORACLE Error