“Certificate verify failed” OpenSSL error when using Ruby 1.9.3

后端 未结 7 1426
無奈伤痛
無奈伤痛 2020-12-01 08:20

I\'m using Ruby 1.9.3p0 on Mac OS 10.6.8 (installed using rvm). When I attempt to create a new Rails application using an application template hosted on GitHub, with this (f

7条回答
  •  孤街浪徒
    2020-12-01 08:36

    It could possibly be because of how you built 1.9.2 and 1.9.3 — maybe whatever tool you used to build each configured things slightly differently. Or maybe they use different versions of OpenSSL.

    Here is the only potentially relevant change I could spot to Net:HTTP between 1.9.2 and 1.9.3

     require 'net/protocol'
    -autoload :OpenSSL, 'openssl'
     require 'uri'
    +autoload :OpenSSL, 'openssl'
    

    (if you want to view the diff...)

    git clone https://github.com/ruby/ruby.git
    cd ruby
    git diff origin/ruby_1_9_2 origin/ruby_1_9_3 -- http.rb
    

提交回复
热议问题