Foursquare & Heroku: Certificate Verification Failed

I got the key / secret for seamless access on the Foursquare developer site, and now I want to get the data using foursquare2gem:

    @foursquare = Foursquare2::Client.new(:client_id => 'xxx', :client_secret => 'yyy')

This works fine on localhost, but on Heroku I get the following error:

ActionView::Template::Error (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed)

I have not configured SSL or Omniauth in the application.

Update: Find a solution! You must go to the ssl hash from the path to the heroku certificate path.

@foursquare = Foursquare2::Client.new(:client_id => 'xxx',
                                      :client_secret => 'yyy',
                                      :ssl => { :verify => OpenSSL::SSL::VERIFY_PEER, :ca_file => '/usr/lib/ssl/certs/ca-certificates.crt' })
+3
source share
1 answer

I also mentioned that the problem is under ruby ​​1.9.3. After downgrading to ruby ​​1.9.2, I no longer got this error ...

0
source

All Articles