1

I recently begun work in Ruby with 'open-uri' and 'net/http' but when i try to run my program the console show me 'OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed'; i just upgrade the new GlobalSignRootCA.pem and putting in 'ssl_cert' folder(http://guides.rubygems.org/ssl-certificate-update/#manual-solution-to-ssl-issue), that allow me to install and upgrade gems without problem, but when i run some program who require 'open-uri' or 'net/http' error appears again. I'm working in Win7-64 but there is very difficult to find some approach. Do you know how to fix this, is drives me crazy.

ELECON88
  • 11
  • 1
  • 4

2 Answers2

1

The best solution I found is:

# remove https source:
gem sources -r https://rubygems.org/

# add http source:
gem sources -a http://rubygems.org

# update 'rubygems':
gem update --system

# now return to https:
gem sources -r http://rubygems.org/
gem sources -a https://rubygems.org/

I know it's not perfect but it solves the problem.

Arturo
  • 3,254
  • 2
  • 22
  • 61
hidded
  • 11
  • 1
  • Does running `gem install bundler` first maybe help? The guides mention how to fix SSL errors here: http://guides.rubygems.org/ssl-certificate-update/ – Ryan Taylor Oct 02 '18 at 17:58
0

I don't know the solution to the exact problem you have been facing, but I have the problem while I try to install the gem, I included cacert.pem consequently it works fine. Can you check my answer here and do the following and that might resolve your problem.

Windows 10 64-bit: ERROR: Could not find a valid gem 'compass' (>= 0), here is why:

I know I am not giving the exact solution to your problem, but please give a try, let's see what happen.

Community
  • 1
  • 1
Gopal
  • 306
  • 2
  • 15