ruby - SSL Error in net::HTTP.get -


i'm trying use ruby search based on account 1234, keep getting ssl_connect returned=1 errno=0 certificate error. site signed, reason ruby doesn't it. certificate signed, i'm not sure why it's rejecting it.

require 'net/http'  uri = uri("https://secure.domain.com/api/account/1234?api_key"+key) response = net::http.get(uri) puts response.body #this must show json contents 

based on suggestion tried, received same error.

net::http.start(uri.host, uri.port,   :use_ssl => uri.scheme == 'https') |http|   request = net::http::get.new uri    response = http.request request # net::httpresponse object end 

turns out error due windows not having support openssl built in. after installing appropriate binaries onto system worked without error.


Comments