songkick / oauth2-provider

Simple OAuth 2.0 provider toolkit
MIT License
526 stars 146 forks source link

undefined method `ssl?' for #<Rack::Request > #34

Closed tian-doxo closed 12 years ago

tian-doxo commented 12 years ago

in my Rails 3.0 app, I found once I have enforce_ssl set to true in initializer, I am getting this error on request:

NoMethodError (undefined method ssl?' for #<Rack::Request:0x7f973655c588>): .rvm/gems/ruby-1.8.7-p302@aspen/bundler/gems/oauth2-provider-0d9fcdf58b56/lib/oauth2/router.rb:68:indetect_transport_error' .rvm/gems/ruby-1.8.7-p302@aspen/bundler/gems/oauth2-provider-0d9fcdf58b56/lib/oauth2/router.rb:13:in parse' .rvm/gems/ruby-1.8.7-p302@aspen/bundler/gems/oauth2-provider-0d9fcdf58b56/lib/oauth2/provider.rb:103:inparse'

I don't see ssl? method in Rack::Request either, is this gem relying on some other gems to provide ssl detection?

jcoglan commented 12 years ago

Which version of Rack are you running?

tian-doxo commented 12 years ago

1.4.1

On 8/2/12 2:52 PM, "James Coglan" <reply+i-5887337-4ba8e1dce65d881159977172135c0cd88305e0ea-852113@reply.gith ub.com> wrote:

Which version of Rack are you running?


Reply to this email directly or view it on GitHub: https://github.com/songkick/oauth2-provider/issues/34#issuecomment-7469374

jcoglan commented 12 years ago

The method definitely exists, and has done for a long time.

https://github.com/rack/rack/blob/1.4.1/lib/rack/request.rb#L84

You ough to check that that file is being loaded correctly.

jcoglan commented 12 years ago

Closing. I'm fairly sure this is not an issue with oauth2-provider. If the method is not defined, there is something else wrong with your environment.