Ssl Error When Installing Rubygems, Unable to Pull Data from 'Https://Rubygems.Org/

SSL Error When installing rubygems, Unable to pull data from 'https://rubygems.org/

For RVM & OSX users

Make sure you use latest rvm:

rvm get stable

Then you can do two things:

  1. Update certificates:

    rvm osx-ssl-certs update all
  2. Update rubygems:

    rvm rubygems latest

For non RVM users

Find path for certificate:

cert_file=$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')

Generate certificate:

security find-certificate -a -p /Library/Keychains/System.keychain > "$cert_file"
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$cert_file"

The whole code: https://github.com/wayneeseguin/rvm/blob/master/scripts/functions/osx-ssl-certs


For non OSX users

Make sure to update package ca-certificates. (on old systems it might not be available - do not use an old system which does not receive security updates any more)

Windows note

The Ruby Installer builds for windows are prepared by Luis Lavena and the path to certificates will be showing something like C:/Users/Luis/... check https://github.com/oneclick/rubyinstaller/issues/249 for more details and this answer https://stackoverflow.com/a/27298259/497756 for fix.

SSL Error When installing rubygems, unable to install rails gem in windows 10

now I got solution for this issue, using this link http://guides.rubygems.org/ssl-certificate-update/#manual-solution-to-ssl-issue

we need to add GlobalSignRootCA.pem this certificate in ssl_certs folder insted of AddTrustExternalCARoot-2048.pem
go through that above link.

Cannot install any ruby gems on Mac OS - SSL_connect error

I had the same issue and used the following 'work around'-
cd into your rails app directory and run the following

gem source -a http://rubygems.org/ 

This will use the insecure http connection rather than the secure https when you run the 'gem install...' command. It's not ideal but it is a short term work around.

You may also need to change the source line in your gemfile from

source 'https://rubygems.org'

to

source 'http://rubygems.org'

Unable to download data from https://rubygems.org/ because certificate verify failed

So my problem was that i needed to be running on ruby version 2.2.2. However that update (only for windows users) pulled a lot of errors that I found to not appear on the mac.



Related Topics



Leave a reply



Submit