Created
July 10, 2012 09:28
-
-
Save ingeniarius/3082285 to your computer and use it in GitHub Desktop.
Install Ruby 1.9.x on Ubuntu from sources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Install Ruby..." | |
sudo apt-get update | |
sudo apt-get install build-essential libssl-dev zlib1g-dev libreadline-dev | |
export ruby_version=1.9.3-p194 | |
cd /usr/src | |
sudo wget "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$ruby_version.tar.bz2" | |
sudo tar xf "./ruby-$ruby_version.tar.bz2" | |
sudo rm "./ruby-$ruby_version.tar.bz2" | |
cd "./ruby-$ruby_version" | |
sudo ./configure | |
sudo make | |
sudo make install | |
echo "RUBYOPT=-Ku" | sudo tee -a /etc/environment | |
sudo tee -a /etc/gemrc <<EOF | |
--- | |
gem: --no-rdoc --no-ri | |
EOF | |
ln -s /etc/gemrc ~/.gemrc | |
echo "Ruby installed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment