$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
gem installed
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ pod --version
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
gem installed
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ pod --version