I used RVM to install Ruby 2.0 on my Mac OS X Mountain Lion. OpenSSL is
installed automatically by RVM before installing Ruby 2.0 (autolibs via
Homebrew). My problem is that ‘net/http’ cannot request through HTTPS.
Here is my script:
uri = URI(‘https://github.com’)
:use_ssl => uri.scheme == ‘https’) do |http|
request = Net::HTTP::Get.new uri
response = http.request request # Net::HTTPResponse object
Here is the output by running it:
connect': undefined methodset_params’ for
do_start' from /Users/siegfried/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:851:instart’
start' from Desktop/test.rb:5:in’
Does anyone have a clue? Thanks.