Skip to content

Instantly share code, notes, and snippets.

@AKurilin
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AKurilin/6a9252c5a3f7598e9662 to your computer and use it in GitHub Desktop.
Save AKurilin/6a9252c5a3f7598e9662 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 install chruby for 2.2.2
#!/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