Forum: Ruby HTTPS with ruby 1.8.4 on Windows?

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.
Axel F. (Guest)
on 2006-03-15 21:56
(Received via mailing list)

does anybody know, what to do to get HTTPS working with ruby 1.8.4 on

I get the error:

RUBY18/lib/ruby/1.8/net/http.rb:565:in `connect': undefined method
`verify_mode' for nil:NilClass (NoMethodError)
	from I:/PROGRAMS/RUBY18/lib/ruby/1.8/net/http.rb:555:in
	from I:/PROGRAMS/RUBY18/lib/ruby/1.8/net/http.rb:544:in `start'
	from I:/PROGRAMS/RUBY18/lib/ruby/1.8/net/http.rb:1031:in
	from I:/PROGRAMS/RUBY18/lib/ruby/1.8/net/http.rb:771:in `get'
	from K:/ssl3.rb:29

The same error is described here:

Solution there: "Rolling back to a clean, fresh ruby 1.8.2-15", but I
don't like to do this... .

For test, I used for example this code:

require 'net/https'

url = URI.parse ''
server =, url.port
server.use_ssl = url.scheme == 'https'
server.verify_mode = OpenSSL::SSL::VERIFY_NONE
response = server.get url.request_uri
puts response.code

I'm using:

ruby 1.8.4 (2005-12-24) [i386-mswin32], Windows 98SE


Lou V. (Guest)
on 2006-03-16 16:38
(Received via mailing list)
This probably doesn't help you much but your code ran for me
on Windows XP SP2 using two different versions of ruby 1.8.4:

ruby 1.8.4 (2005-12-24) [i386-mswin32]
ruby 1.8.4 (2005-12-26) [i386-cygwin]

(One is compiled with Visual C++ and the other with gcc.)

Your code returned a response status of 302, which is a redirect,
which I believe is the correct response since the https page wants
to redirect to this page:

unknown (Guest)
on 2006-03-29 22:06
(Received via mailing list)

I got the same problem, same error, works with 1.8.2 doesn't with 1.8.4

Did you find the problem?

Axel F. (Guest)
on 2006-03-29 22:36
(Received via mailing list)
> Did you find the problem?

Unfortunately, no.

This topic is locked and can not be replied to.