It is possible you do not have a fully up to date root certificate list, 
root certificates are stores in the browser, but OpenSSL uses its own 
directory

Since you are using rvm on OS X by the look of it, so you may want to try 
the following command to see if this helps

rvm osx-ssl-certs update



On Monday, 8 June 2015 18:07:23 UTC+1, j...@via.net wrote:
>
> I have web site that open ok in the browser - no errors or warnings about 
> the certificate. When I open it with open(), I get the following error:
>
> /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:931: 
> `SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: 
> certificate verify failed' (OpenSSL::SSL::SSLError)
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:852:in 
> `start'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:318:in 
> `open_http'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in 
> `buffer_open'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in 
> `block in open_loop'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in 
> `catch'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in 
> `open_loop'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in 
> `open_uri'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in 
> `open'
>
> from /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in 
> `open'
>
> from t.rb:13:in `<main>'
>
> /Users/joe/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:931:          
> raise exception
>
>
> Trying another SSL enabled site (https://www.google.com) works ok.
>
> Any ideas here?
>
> Thanks,
>
> Joe
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/83e6ecd3-731b-47ef-8a07-2e1f24c64b0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to