我使用Authlogic-Connect第三方登录。在运行适当的迁移后,Twitter/谷歌/yahoo登录似乎工作正常,但facebook登录抛出异常:

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

开发日志显示

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):
  app/controllers/users_controller.rb:37:in `update'

请建议. .


当前回答

最新的rubygem-update-2.6.7已经解决了这个问题。http://guides.rubygems.org/ssl-certificate-update/

其他回答

这对我很管用。如果你使用rvm和brew:

rvm remove 1.9.3
brew install openssl
rvm install 1.9.3 --with-openssl-dir=`brew --prefix openssl`

OS x 10.8。x与Homebrew:

brew install curl-ca-bundle
brew list curl-ca-bundle
cp /usr/local/Cellar/curl-ca-bundle/1.87/share/ca-bundle.crt /usr/local/etc/openssl/cert.pem

对我来说最直接的答案是

sudo apt-get install openssl ca-certificates

瞧! !

以下是如何在Windows上修复它:https://gist.github.com/867550(由Fletcher Nichol创建)

摘录:

手工方式(无聊) 下载cacert。来自http://curl.haxx.se/ca/cacert.pem的Pem文件。将文件保存到C:\RailsInstaller\cacert.pem。 现在,通过设置SSL_CERT_FILE,让ruby知道您的证书颁发机构包。要在当前命令提示符会话中设置此选项,输入: 设置SSL_CERT_FILE = C: \ RailsInstaller \ cacert.pem 要使此设置为永久设置,请在控制面板中添加此设置。

一行程序在Admin提示符中修复了Windows的问题

巧克力安装wget(第一次见chocolatey.org)

wget http://curl.haxx.se/ca/cacert.pem -O C:\cacert.pem && setx /M SSL_CERT_FILE "C:\cacert.pem"

或者这样做:

gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/

Milanio的方法:

gem sources -r https://rubygems.org
gem sources -a http://rubygems.org 
gem update --system
gem sources -r http://rubygems.org
gem sources -a https://rubygems.org

gem install [NAME_OF_GEM]