Last active
August 29, 2015 14:27
-
-
Save akurilin/6a9252c5a3f7598e9662 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 install chruby for 2.2.2
This file contains hidden or 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
#!/bin/bash | |
sudo apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev | |
pushd /tmp | |
wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz | |
tar -xzvf chruby-0.3.9.tar.gz | |
cd chruby-0.3.9/ | |
sudo make install | |
cd /tmp | |
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2 | |
tar -xjvf ruby-2.2.2.tar.bz2 | |
cd ruby-2.2.2 | |
./configure --prefix=/opt/rubies/ruby-2.2.2 | |
make | |
sudo make install | |
popd | |
echo '# ruby - chruby' >> ~/.bashrc | |
echo 'source /usr/local/share/chruby/chruby.sh' >> ~/.bashrc | |
echo 'chruby ruby-2.2.2' >> ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment