Unable to download data from rubygems

2019-05-04 15:33发布

问题:

I don't know what this error means when trying to run gem update --system;

{9:29}[2.2.3]~ ➭ gem update --system
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

I also get a similar error when trying;

{9:30}[2.2.3]~ ➭ gem install tunnelss
ERROR:  Could not find a valid gem 'tunnelss' (>= 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/specs.4.8.gz)

FYI - I can visit https://api.rubygems.org/specs.4.8.gz in the browser and it will start downloading so that's not the problem.

Don't really know what to try. Can anyone advise?

回答1:

This is a known issue, see https://gist.github.com/luislavena/f064211759ee0f806c88 and/or https://gist.github.com/fnichol/867550 for solving it.

I stumbled over the same issue yesterday when I installed Ruby on Windows. So, personally, this https://superdevresources.com/ssl-error-ruby-gems-windows/ worked for me. The other guide mentioned a non-existent URL to the cacert.pem



标签: ssl rubygems