I am building a Rails 3 application using Devise / OmniAuth and Koala and I get the following SSL error:
OpenSSL::SSL::SSLError in Users/omniauth callbacksController
Code causing this error:
@graph = Koala::Facebook::GraphAPI.new(@token) @friends = @graph.get_connections("me", "friends")
I am using Devise with OmniAuth to perform authentication, which works. Then I take the returned facebook token and try to use it with Koala, as shown above. This is what causes this error.
It may be worth noting that I was getting the same error with Devise and OmniAuth initially. There are several topics about this error, and I was able to solve it by setting my config / initialisers / devise.rb with
config.omniauth :facebook, APPID, APPKEY, {:client_options => {:ssl => {:ca_file => "/opt/local/share/curl/curl-ca-bundle.crt"}}}
I assume that I need to provide a similar configuration for Koala so that it knows where to get the local ca_file. However, I cannot find any guidance on how to do this in the documentation. Any ideas on how to do this, or how to avoid a mistake altogether?
My dev is OSX.
source share