Certificate Verify Failed in "gem install foundation"

NixondisNRVA picture NixondisNRVA · Dec 19, 2014 · Viewed 17.6k times · Source

Trying to install Foundation after installing nodejs, ruby, and git plus bower.

I keep getting the following error and I dont know how to fix it:

Could not find a valid gem 'foundation' (>= 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://api.rubygems.org/latest_specs.4.8.gz)

Any ideas?

Answer

Ryan Taylor picture Ryan Taylor · Oct 16, 2016

If you're using RVM (highly recommended) you can run

rvm osx-ssl-certs update all

Otherwise you can follow the directions at http://guides.rubygems.org/ssl-certificate-update/ and while the update_rubygems patch didn't do anything for me, manually installing the .pem file probably would have worked.

Without RVM the link suggests that you can try...

gem install bundler

or

gem update --system