When running pod repo update the following error is generated:
Updating spec repo `master`
[!] Failed to connect to GitHub to update the CocoaPo
A slightly simpler solution from Adem's that doesn't use rbenv:
brew install openssl
brew upgrade openssl
brew install ruby
brew link --overwrite ruby
Finally, make sure you don't have your PATH variable set to have /usr/local/bin after $PATH. Your PATH export in ~/.bash_profile should look similar to this:
export PATH=/usr/local/bin:$PATH