Skip to content

Instantly share code, notes, and snippets.

@scottjbarr
Created January 7, 2010 05:01
Show Gist options
  • Save scottjbarr/271007 to your computer and use it in GitHub Desktop.
Save scottjbarr/271007 to your computer and use it in GitHub Desktop.
Install Ruby 1.8 and Rubygems from source
#!/bin/bash
#
# Install Ruby 1.8 from source
#
# Author : Scott Barr
# Date : 7 Jan 2010
RUBY_VERSION=1.8.7-p249
RUBYGEMS_VERSION=1.3.5
cd /usr/local/src
# install ruby
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-${RUBY_VERSION}.tar.gz
tar -zxf ruby-${RUBY_VERSION}.tar.gz
cd ruby-${RUBY_VERSION}
./configure
make
sudo make install
cd ..
# install rubygems
wget http://rubyforge.org/frs/download.php/60718/rubygems-${RUBYGEMS_VERSION}.tgz
tar -zxf rubygems-${RUBYGEMS_VERSION}.tgz
cd rubygems-${RUBYGEMS_VERSION}
sudo ruby ./setup.rb
ruby -v
gem -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment