使用HTTPS源时Rubygems上的可怕OpenSSL :: SSL :: SSLError

ale*_*nde 2 openssl rubygems

$ bundle 
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Run Code Online (Sandbox Code Playgroud)

好的,将Gemfile更改为:

source 'https://rubygems.org'
Run Code Online (Sandbox Code Playgroud)

但是之后:

$ bundle 
    Unfortunately, a fatal error has occurred. Please see the Bundler
    troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/ale/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/http.rb:917:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
Run Code Online (Sandbox Code Playgroud)

我如何解决这个无休止的SSL混乱局面?

小智 5

解决方案在此处详细解释:http://railsapps.github.com/openssl-certificate-verify-failed.html

  • 我唯一没有尝试的是评论和山狮在这里,这是真正的解决方案!与BREW安装`卷曲-CA-bundle`证书包后做`出口SSL_CERT_FILE =在/ usr /本地的/ opt /卷曲-CA-束/股/ CA-bundle.crt`,它会工作.你可以把它放在你的.bash_profile中. (3认同)