FB Connect with Devise + Omniauth get error: hostname was not match with the server certificate
I'm running into 开发者_如何学JAVAa problem, 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?
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
精彩评论