Skip to content

Instantly share code, notes, and snippets.

@wilsonsilva
Created July 23, 2014 17:44
Show Gist options
  • Save wilsonsilva/feccbe46f4326f85845a to your computer and use it in GitHub Desktop.
Save wilsonsilva/feccbe46f4326f85845a to your computer and use it in GitHub Desktop.
Install ruby and rubygems from source
# TODO: Use variables for the versions
# TODO: Accept command-line arguments and install everything
# Install Ruby
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar xvzf ruby-2.1.2.tar.gz
cd ruby-2.1.2
./configure --prefix=/usr
make
make install
# Install RubyGems
wget http://production.cf.rubygems.org/rubygems/rubygems-2.4.1.tgz
tar xvzf rubygems-2.4.1.tgz
cd rubygems-2.4.1
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
cd /tmp
rm -rf ruby-2.1.2
rm -rf rubygems-2.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment