0

I'm running into a problem, where I keep getting this error after entering my Facebook username/password.

OpenSSL::SSL::SSLError

hostname was not match with the server certificate"

I'm on Mac 10.6.6, Ruby 1.9.2-p180, Rails 3.0.7 with XCode installed, using Devise and Omniauth to do this Facebook connect.

How can I get this over with?

5
  • Can you post the callback URL that you had used while registering your app in facebook and also the URL that you are trying to use in your local machine?
    – Aj Gu
    May 14, 2011 at 22:16
  • @Aroop: yes the Site URL/Canvas URL: localhost:3000 and the ran locally, the URL is localhost:3000
    – JNN
    May 15, 2011 at 6:04
  • Make sure that you have a tailing / for your canvas URl.
    – Aj Gu
    May 15, 2011 at 9:10
  • @Aroop: yes sure, even I didn't add, by clicking "Save" button, Facebook will add it automatically. Any idea?
    – JNN
    May 15, 2011 at 9:30
  • I had this error a while back but I don't remember what I have done to fix it. Can you please post the complete trace that way I might recollect what I did to fix it.
    – Aj Gu
    May 15, 2011 at 19:06

1 Answer 1

-1

Answer on my own, it may help others who have the same issue:

This error is because of SSL Certification checking. I followed some online tutorials to create cert files on Mac OS but it took too much time so finally I decided to bypass the SSL checking on development machine by adding these lines to ./config/initializers/devise.rb:

if Rails.env.development? 
  OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE 
end
1
  • Could the one who made a downvote tell me the reason? At least this helps people to test on local machine without being confused with SSL configuration.
    – JNN
    Jun 25, 2012 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.