If you use Facebook and Omniauth, you'll find that recent updates which I think more to do with Ruby has caused some issue.

Read about Ruby 1.9 and the SSL error.

The exact error I got is:

A OpenSSL::SSL::SSLError occurred in #:

  SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
  /home/user/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:678:in `connect'

Encountered after upgrading to new version of omniauth.

Stackoverflow has been helpful for me to find the fix but had to read more about that certificate required.

Make sure to update config.

Rails.application.config.middleware.use OmniAuth::Builder do
    provider :facebook, FACEBOOK_KEY, FACEBOOK_SECRET, {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}}
end

It wasn't stated clearly on the posts but this all you need to get it working:

cd /etc/ssl/certs
sudo wget http://curl.haxx.se/ca/cacert.pem
comments powered byDisqus

Hello! I am Kat. I've been a developer for several years. When I'm not sitting down, reading and working for long hours, I am traveling to some place of interest.
If you want to reach out, you can send me an email or add me up on Google Plus.