Archive for February, 2017

Manual Installation of Ruby 2.4 with Ruby Gems

Monday, February 6th, 2017

One short shell-script, which installs the current version of Ruby and Ruby Gems.

#!/bin/bash
cd /usr/src
RUBY=ruby-2.4.0
GEMS=rubygems-2.6.10

# Ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.4/$RUBY.tar.gz
tar xvzf $RUBY.tar.gz
cd $RUBY
./configure --prefix=/usr
make
make install
cd ..

# RubyGems
wget https://rubygems.org/rubygems/$GEMS.tgz
tar xvzf $GEMS.tgz
cd $GEMS
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
cd ..