Install Homebrew
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 2.
Install Rbenv
$ brew install rbenv
$ brew install ruby-build
Set shell Environment
$ sudo echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> /Users/Username/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> /Users/Username/.bash_profile
Reload
$ source /Users/Username/.bash_profile
Rbenv install plugin
$ mkdir -p ~/.rbenv/plugins
$ git clone git://github.com/tpope/rbenv-aliases.git ~/.rbenv/plugins/rbenv-aliases
$ rbenv alisa
Install Ruby
List Ruby version
$ rbenv install --list
$ rbenv install 2.1.3
List Installed Ruby Version
$ rbenv versions
$ rbenv global 2.1.3
Step 3.
Install Cocoapods
$ sudo gem install cocoapods
沒有留言:
張貼留言