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
Try using http://rubygems.org/ (without SSL) as a source — that fixed the error for me.
gem source -r https://rubygems.org/ gem source -a http://rubygems.org/ gem install cocoapods