Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gem install cannot download from rubygems.org

When I type

gem install sass

I get the following error message

C:>gem install compass ERROR: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://rubygems.org/latest_specs.4.8.gz)

like image 813
user3567761 Avatar asked Dec 02 '14 23:12

user3567761


1 Answers

I have experienced the same symptoms on Win7, Ruby 2.1.5 64bit - different gem, but same error message.

In my case, I had to install a new root certificate for rubygems, this link describes how:

https://gist.github.com/luislavena/f064211759ee0f806c88

The reason is that the ruby installation contains its own set of root certificates which are used when establishing secure connection with rubygems.org - but the certificate has since been changed on the server - so none of the root certificates that comes with this ruby installer can validate the server certificate. That is why you need to update the root certificate.

like image 135
Pete Avatar answered Sep 21 '22 13:09

Pete