(FYI: I'm following the Twitter Omniauth from railscast #241. I used Twitter successfully, now going onto Facebook)
As soon as I logged into Facebook using Omniauth, I get this error:
Faraday::Error::ConnectionFailed SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
What does this mean?
This is my code
Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, '<key from fb>', '<another key from fb>' end
There's actually nothing much in my code, all I have is in the sessionController that I want to use to_yaml to see what's inside the request.env
class SessionsController < ApplicationController def create raise request.env["omniauth.auth"].to_yaml end end
How do I solve the Faraday error?
I've fixed this on Mac OS X Lion 10.7.4 with this solution:
$ rvm remove 1.9.3 (or whatever version of ruby you are using) $ rvm pkg install openssl $ rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr
after this you will need to download the missing cacert.pem file:
$ cd $rvm_path/usr/ssl $ sudo curl -O http://curl.haxx.se/ca/cacert.pem $ sudo mv cacert.pem cert.pem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With