Some time ,the default source of gem,https://rubygems.org/, can't be accessed.
It should be removed by command :
gem sources -r https://rubygems.org/
And then add new source :
gem sources -a http://ruby.taobao.org/
Update the cache:
gem sources -u
You can check souces:
gem sources
Finally , you can install :
sudo gem install cocoa pods
参考:
http://stackoverflow.com/questions/19612185/unable-to-install-cocoapods-gem-from-rubygems-org-bad-response-backend-read-e