
Use rbenv to install cocoapods
2018, Feb 08
Reference: https://telliott.io/2015/10/14/using-rbenv-for-cocoapods-post-el-capitan.html
Xcode
xcode-select --install
rbenv
brew update
brew install rbenv ruby-build
Config rbenv to bash_profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
Update Ruby
rbenv install 2.5.0
rbenv global 2.5.0
Refresh Env
rbenv rehash
source ~/.bash_profile
Install cocoapods
gem install cocoapods
Update env
rbenv rehash