leemengtaiwan
10/11/2017 - 10:38 AM

MAC利用brew更新ruby後安裝heroku cli

MAC利用brew更新ruby後安裝heroku CLI (前提都是使用brew, 要看對應 MAC 版本)

References
- https://gorails.com/setup/osx/10.12-sierra
- https://devcenter.heroku.com/articles/heroku-cli#download-and-install

brew install rbenv ruby-build

# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

# Install Ruby
rbenv install 2.4.2
rbenv global 2.4.2
ruby -v