Forum: Ruby GET HTTPS request with Ruby 2.3.0

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1057478e3cb6dc53aa4d46220dd9d189?d=identicon&s=25 Rub Rubinsky (rubinsky)
on 2017-02-09 21:58

I'm stuck with an error when I try to do a get request.
`connect_nonblock': SSL_connect returned=1 errno=0 state=error:
certificate verify failed (OpenSSL::SSL::SSLError)

This was my code:

uri = URI(link)
Net::HTTP.start(, uri.port,
  :use_ssl => uri.scheme == 'https') do |http|
  request = uri

  response = http.request request # Net::HTTPResponse object
  puts response.body

Have anyone else gotten the same connection error before?

Found my answer.
I needed to add:

require 'openssl'
This topic is locked and can not be replied to.