3

I obtained a key/secret for userless access at the foursquare developer site and now I want to fetch data with the use of the foursquare2 gem:

    @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 didn't set up any SSL or Omniauth within the app.

Update: Found the solution! You have to pass in a ssl hash with the path to heroku's certificates 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' })
Lukas Hoffmann
  • 607
  • 1
  • 8
  • 21

1 Answers1

0

I also mentioned that problem under ruby 1.9.3. After downgrading to ruby 1.9.2 I didn't get that error anymore...

monavari-lebrecht
  • 900
  • 3
  • 9
  • 23