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.

Revisions

  1. agisilaos revised this gist Oct 21, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    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.

  2. agisilaos revised this gist Oct 21, 2016. No changes.
  3. agisilaos created this gist Oct 21, 2016.
    25 changes: 25 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    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.