I am using a Windows PC running 8.1 and working with Ruby Installer 2.1.5.
While installing a gem I am getting a error:
C:\> gem install bundle
ERROR: Could not find a valid gem 'bundle' (>= 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://api.rubygems.org/latest_specs.4.8.gz)
I hope there is a good solution.
Summary. The Ruby OpenSSL error certificate verify failed means your code can't verify that the SSL certificate of the website or API you're connecting to is the real one. It's important to solve this issue correctly to keep your communication secure.
With the --local ( -l ) option, you would perform a local search through your installed gems. To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.
I had this problem too. But using the older version is not the proper solution.
Here is the two solution help to fix this certificate error
1. Using the http instead of https will allow you to install the gem without that error
gem install bundler -r --source http://rubygems.org/
2. Update the certificate based on the solution provided in the below link
https://gist.github.com/luislavena/f064211759ee0f806c88
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With