Take the 2-minute tour ×

I've seen questions similar to this one but the suggested solution didnt seem to work.

I'm trying to perform oauth, using oauth2, when im trying to get the access_token, I get the following error:


I'm using:

rails 2.3.11
faraday 0.8.1
oauth2 0.8.0

and I'm running on Windows 7.

Any ideas?

share|improve this question
Development or production? –  KensoDev Aug 8 '12 at 17:29
Development, staging and production are linux based –  Ran Aug 8 '12 at 17:30
add comment

2 Answers

up vote 1 down vote accepted

put this in development.rb

require 'openssl'

This will solve your issues.

share|improve this answer
Avi, while this will make the error go away, this is NOT a solution. In fact, this is a terrible piece of advice. This will render the whole SSL pointless. The proper way is to use a proper certificate bundle. For example: stackoverflow.com/questions/9199660/… –  Roman Aug 8 '12 at 18:21
This is definitely not a production solution, this is a solution for development only and I would not say this is ANY sort of solution if the guy was not using windows. it's a dev machine and it's windows 7. –  KensoDev Aug 8 '12 at 19:40
add comment

The proper solution would be to initialize the OAuth::Client with a proper certificate bundle (it can be taken from a curl distribution, for instance).

client = OAuth2::Client.new(client_id, client_secret, ssl: {ca_file: "/path/to/ca-bundle.crt"})
share|improve this answer
add comment

Your Answer


