我使用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'

请建议. .


当前回答

只需在gemfile中添加gem 'certified',然后运行bundle install。

宝石“认证” 包安装

其他回答

添加到你的gemfile:

git => git://github.com/ yaauie/clivers, ref => 5617c

添加gem 'certified', '~> 1.0'到我的Gemfile和运行bundle解决了我的这个问题。

有时这并不总是rvm的问题 在MAC OSX中,如果你删除了.rvm,问题仍然存在(特别是当你从timemachine备份数据时),你可以尝试这种方式。

1.brew update
2.brew install openssl

我不得不重新安装Ruby。如果你使用Ubuntu & rbenv,这应该可以解决这个问题:

rbenv uninstall your_version

# install dependencies
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

# install ruby with patch
curl -fsSL https://gist.github.com/mislav/055441129184a1512bb5.txt | \
  rbenv install --patch your_version

有关更多信息,请查看rbenv Wiki。

只是因为对我有用的说明略有不同,我想我补充一下我的意见:

我在OS X Lion和使用macports和rvm

我安装了curl-ca-bundle:

sudo port install curl-ca-bundle

然后我调整了我的omniauth配置如下:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :google_oauth2, APP_CONFIG['CONSUMER_KEY'], APP_CONFIG['CONSUMER_SECRET'],
           :scope => 'https://www.google.com/m8/feeds https://www.googleapis.com/auth/userinfo.profile',
           :ssl => {:ca_path => "/share/curl/curl-ca-bundle.crt"}
end