Cocoapods relies on Ruby, and there are many ways to install Ruby. The easiest one I know of is Brew Install Ruby
To use this command, you must: Have Homebrew installed; The installation method of Homebrew changes all the time (but the installation method is updated at http://brew.sh)
Today is 2016,7,12 installation method is: / usr/bin/ruby – e “$(curl – fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”