install ruby
# check if ruby is installed
gem -v
cd /usr/src
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz
tar -xvf ruby-2.2.1.tar.gz
cd ruby-2.2.1
yum install libffi
yum install libffi-devel
yum install openssl
./configure --with-openssl-dir=/usr
make
make install
# ruby gems
wget http://production.cf.rubygems.org/rubygems/rubygems-2.4.6.tgz
ruby setup.rb