gpt4 book ai didi

ruby-on-rails - Rails 错误 : certificate verify failed. ..我已经尝试了一切

转载 作者:太空宇宙 更新时间:2023-11-03 13:15:44 25 4
gpt4 key购买 nike

所以我正在尝试让 Google 身份验证与 rails 和设计一起工作。我关注了this github setup当用户在成功登录后被重定向时,我收到此错误:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

我确实尝试了所有可以在网上找到的解决方案,但似乎没有任何效果。我下载了/usr/local/etc/openssl/certs/cert.pem 中的新证书,它在我的 devise.rb 中:

  config.omniauth :google_oauth2, "92780849937-vk78tsfss43p1m9k95ijfhimi422hfh7.apps.googleusercontent.com", "oEM4yvhazRJBgL7ANtpVtpU5", { :client_options => {:ssl => {:ca_path => "/usr/local/etc/openssl/certs"}}}

我正在运行 ruby​​ 2.1.0 和 Rails 4.2.4有什么我想念的吗?也许这个版本的 rails 有不同的解决方案?

我将它添加到我的 application.rb 以便我可以继续工作,但显然它非常糟糕哈哈哈哈

require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

最佳答案

您可以将 gem 'certified' 添加到您的 Gemfile 中以解决此问题。检查他们的Github page还有这个SO question

关于ruby-on-rails - Rails 错误 : certificate verify failed. ..我已经尝试了一切,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40124696/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com