Last active
March 21, 2021 23:55
-
-
Save njh/1f28803af2ecf420cdaf to your computer and use it in GitHub Desktop.
Install/update rbenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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
Thank you man, that was extremely helpful.