forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrbenv
More file actions
18 lines (13 loc) · 669 Bytes
/
Copy pathrbenv
File metadata and controls
18 lines (13 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fancy_echo "Installing rbenv, to change Ruby versions ..."
brew_install_or_upgrade 'rbenv'
if ! grep -qs "rbenv init" ~/.zshrc; then
printf 'export PATH="$HOME/.rbenv/bin:$PATH"\n' >> ~/.zshrc
printf 'eval "$(rbenv init - zsh --no-rehash)"\n' >> ~/.zshrc
fancy_echo "Enable shims and autocompletion ..."
eval "$(rbenv init - zsh)"
fi
export PATH="$HOME/.rbenv/bin:$PATH"
fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..."
brew_install_or_upgrade 'rbenv-gem-rehash'
fancy_echo "Installing ruby-build, to install Rubies ..."
brew_install_or_upgrade 'ruby-build'