Skip to content

Instantly share code, notes, and snippets.

@frankyston
Forked from njh/install-rbenv.sh
Created January 9, 2019 00:11
Show Gist options
  • Save frankyston/31d72ed3cd05b0bc42d910080c3bbf94 to your computer and use it in GitHub Desktop.
Save frankyston/31d72ed3cd05b0bc42d910080c3bbf94 to your computer and use it in GitHub Desktop.
Install/update rbenv
# Download rbenv
if [ ! -d ~/.rbenv ]; then
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
fi
cd ~/.rbenv
git reset --hard
git pull origin master
# Download ruby-build
if [ ! -d ~/.rbenv/plugins/ruby-build ]; then
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
fi
cd ~/.rbenv/plugins/ruby-build
git reset --hard
git pull origin master
# Setup rbenv
cd ~
export HOME=`pwd`
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv --version
rbenv versions
rbenv install --list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment