Setting Environment Variables in Rails 3 (Devise + Omniauth)

You could take a look at the comments: You can either set environment variables directly on the shell where you are starting your server: FACEBOOK_APP_ID=12345 FACEBOOK_SECRET=abcdef rails server Or (rather hacky), you could set them in your config/environments/development.rb: ENV[‘FACEBOOK_APP_ID’] = “12345”; ENV[‘FACEBOOK_SECRET’] = “abcdef”; An alternative way However I would do neither. I would create … Read more

OmniAuth & Facebook: certificate verify failed [duplicate]

The real problem is that Faraday (which Omniauth/Oauth use for their HTTP calls) is not wasn’t setting the ca_path variable for OpenSSL. At least on Ubuntu, most root certs are stored in “/etc/ssl/certs”. Since Faraday isn’t wasn’t setting this variable (and currently does not have a method to do so), OpenSSL isn’t wasn’t finding the … Read more