Skip to content

Instantly share code, notes, and snippets.

@mankind
Last active August 29, 2015 14:02
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 mankind/de9ef556a579f3980dea to your computer and use it in GitHub Desktop.
Save mankind/de9ef556a579f3980dea to your computer and use it in GitHub Desktop.
install rbenv
#https://github.com/fesplugas/rbenv-installer/blob/master/bin/rbenv-installer
#wget --no-check-certificate https://gist.githubusercontent.com/mankind/de9ef556a579f3980dea/raw/301942dcfd869879d9b1f7224d4bb52d78813bec/rbenv_install.sh && bash rbenv_install.sh
sudo apt-get -y update && apt-get upgrade
echo "======================================="
echo "========= Cloning Rbenv ========="
echo "======================================="
# https://gorails.com/setup/ubuntu/13.10
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# source ~/.bashrc or source ~/.profile as an alternative to exec $SHELL
source ~/.bashrc
echo "======================================="
echo "========= Cloning ruby build ========="
echo "======================================="
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
echo "======================================="
echo "========= Installing Ruby with Rbenv ========="
echo "======================================="
rbenv install 2.1.2
rbenv global 2.1.2
rbenv rehash
ruby -v
echo "======================================="
echo "========= Congratulations you installed Ruby with Rbenv ========="
echo "======================================="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment