Skip to content

Instantly share code, notes, and snippets.

@njh
Last active March 21, 2021 23:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save njh/1f28803af2ecf420cdaf to your computer and use it in GitHub Desktop.
Save njh/1f28803af2ecf420cdaf 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
@nateritter
Copy link

Thank you! This was exactly what I needed!

@ldelbel
Copy link

ldelbel commented Mar 21, 2021

Thank you man, that was extremely helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment