public
Created

Ubuntu Ruby install - ruby-1.9.2-p290 build

  • Download Gist
ruby_setup.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# http://dwiardiirawan.tumblr.com/post/5165127927/installing-ruby-1-9-2-and-rails-3-0-7-on-ubuntu-11-04
# http://torqueo.net/installing-ruby-192-and-rails-3-stable-on-ubuntu/
 
sudo apt-get -y install gcc g++ build-essential libssl-dev libreadline5-dev zlib1g-dev libyaml-dev bison checkinstall linux-headers-generic libsqlite3-dev
 
version=1.9.2-p290
 
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$version.tar.gz
tar -xvzf ruby-$version.tar.gz
cd ruby-$version/
 
./configure -prefix=/usr/local/ruby
make && sudo make install
 
sudo ln -s /usr/local/ruby/bin/rake /usr/local/bin/rake
sudo ln -s /usr/local/ruby/bin/ruby /usr/local/bin/ruby
sudo ln -s /usr/local/ruby/bin/gem /usr/local/bin/gem
sudo ln -s /usr/local/ruby/bin/erb /usr/local/bin/erb
sudo ln -s /usr/local/ruby/bin/irb /usr/local/bin/irb
sudo ln -s /usr/local/ruby/bin/rdoc /usr/local/bin/rdoc
sudo ln -s /usr/local/ruby/bin/ri /usr/local/bin/ri
sudo ln -s /usr/local/ruby/bin/testrb /usr/local/bin/testrb
 
gem update --system

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.