Skip to content

Instantly share code, notes, and snippets.

@vyder
Last active December 1, 2015 05:48
Show Gist options
  • Save vyder/6e1050127e8fb35402cf to your computer and use it in GitHub Desktop.
Save vyder/6e1050127e8fb35402cf to your computer and use it in GitHub Desktop.
Install RBenv + Ruby
VERSION_TO_INSTALL='2.2.2'
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export RBENV_ROOT='${HOME}/.rbenv"' >> ~/.bash_profile
echo 'if [ -d "${RBENV_ROOT}" ]; then' >> ~/.bash_profile
echo ' export PATH="${RBENV_ROOT}/bin:${PATH}"' >> ~/.bash_profile
echo ' eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'fi' >> ~/.bash_profile
source ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.bash_profile
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
rbenv install -v $VERSION_TO_INSTALL
rbenv global $VERSION_TO_INSTALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment