Last active
January 17, 2019 15:01
-
-
Save thehashrocket/67edb6fa75d61bd851e5654372822739 to your computer and use it in GitHub Desktop.
setup-rbenv.sh
This file contains 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
#!/bin/bash | |
set -ex | |
brew update | |
brew install rbenv ruby-build | |
rbenv install 2.5.3 | |
echo "export GEM_HOME=$HOME/gems" >> ~/.zshrc | |
echo "export PATH=$HOME/gems/bin:$PATH" >> ~/.zshrc | |
source ~/.zshrc | |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash | |
rbenv global 2.5.3 | |
gem install bundler | |
rbenv rehash | |
ruby -v | |
if ! type rbenv | grep function; then | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc | |
fi | |
set +x | |
echo "Done! Close and reopen your terminal" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment