intridea/omniauth — Issue #580: NoMethodError when clicking user_omniauth_authorize_path(:facebook) link
Author: asavin
Created: 2012-02-24 14:48:50+00:00
State: open

I'm currently trying to migrate to Rails 3.2. Right now I'm getting this error when clicking on user_omniauth_authorize_path(:facebook) link:

Started GET "/users/auth/facebook" for 127.0.0.1 at 2012-02-24 16:42:22 +0200

NoMethodError (undefined method `include?' for nil:NilClass):
omniauth (1.0.2) lib/omniauth/strategy.rb:165:in `call!'
omniauth (1.0.2) lib/omniauth/strategy.rb:148:in `call'
omniauth (1.0.2) lib/omniauth/builder.rb:42:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home/alex/.rvm/gems/ruby-1.9.2-p180@hundredthings/bundler/gems/rack-e20baec00523/lib/rack/etag.rb:23:in `call'
/home/alex/.rvm/gems/ruby-1.9.2-p180@hundredthings/bundler/gems/rack-e20baec00523/lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/flash.rb:242:in `call'
/home/alex/.rvm/gems/ruby-1.9.2-p180@hundredthings/bundler/gems/rack-e20baec00523/lib/rack/session/abstract/id.rb:205:in `context'
/home/alex/.rvm/gems/ruby-1.9.2-p180@hundredthings/bundler/gems/rack-e20baec00523/lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.1) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `_run__2432610257142096273__call__3840521902140125918__callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'

Here is my current Gemfile content. That gem 'rack' thing is that I found similar issue that was related to rack 1.4.0 ( https://github.com/rack/rack/issues/322 ). But even without this custom rack gem it also doesn't work.

source 'http://rubygems.org'

gem 'rails', '3.2.1'

group :assets do
gem 'sass-rails', "~> 3.2.3"
gem 'coffee-rails', "~>3.2.1"
gem 'uglifier', '>= 1.0.3'
end

gem "rack", git: "https://github.com/rack/rack.git", ref: "e20baec005238f9876281c0d083fe5a4e01aa034"

gem 'simple_form'
gem 'paperclip', '~> 2.3'
gem 'devise', '1.5.3'
gem 'omniauth', '>= 1.0.0'
gem 'omniauth-facebook'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'jquery-rails', '>= 1.0.12'
gem 'oauth', '>= 0.3.0'
gem 'oauth-plugin', '>=0.4.0.pre1'
#gem 'oauth-plugin', :git => "http://github.com/alsemyonov/oauth-plugin.git", :branch => "rails3"
gem 'heroku'
gem 'uuid'
gem 'acts_as_list'
gem "nifty-generators", :group => :development
gem 'koala'