$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods [...] 1 gem installed cocoapods
$ export PATH=$PATH:$HOME/Sofware/ruby/bin
open ~/.bash_profile
souce ~/.bash_profile