Skip to content

Instantly share code, notes, and snippets.

@agisilaos
Last active October 21, 2016 16:04
Show Gist options
  • Save agisilaos/fea8228fc058244f94d85d173396c64b to your computer and use it in GitHub Desktop.
Save agisilaos/fea8228fc058244f94d85d173396c64b to your computer and use it in GitHub Desktop.
Certificate error installing cocoapods.
You tried to install cocoapods on your mac and you got an error exactly like this one?
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
I had to get pass this error and I was asking myself: Why I couldn't download CocoaPods and what's the error is about?
After a lot of research, it is all about the certificate. You can solve this by updating the certificate.
rvm osx-ssl-certs update all
After that you need to think and update the rubygems to the latest version:
rvm rubygems latest
Then try again and install cocoapods
$ [sudo] gem install cocoapods
You will get a lot of messages in your console so I will made it more simple to you, at the end it should say something like xx gems installed.
That means you have successfully installed CocoaPods, great now you have to setup it:
$ pod setup
Now you will probably see "Setup completed"
You succesfully installed Cocoapods. I hope that this gist helped you even a little with this weird error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment