I tried to install cocoapods (http://cocoapods.org/) on my OSX Mountain Lion.
moshe-mbp:~ moshem$ gem install cocoapods ERROR: Could not find a valid gem
This is fixed by avoiding https and using the insecure http instead. Running this worked for me.
gem source -a http://rubygems.org/