fertapric/rails3-mongoid-devise-omniauth — Issue #5: NoMethodError (undefined method `[]' for nil:NilClass):
Author: deivinsontejeda
Created: 2011-10-30 22:19:50+00:00
State: open

Hello Guys,

I have following error when deploy my app on heroku

2011-10-30T22:00:31+00:00 app[web.1]: Started GET "/auth/twitter" for 186.14.45.85 at 2011-10-30 15:00:31 -0700
2011-10-30T22:00:31+00:00 app[web.1]: Processing by AuthenticationsController#create as HTML
2011-10-30T22:00:31+00:00 app[web.1]: Parameters: {"success"=>true, "provider"=>"twitter"}
2011-10-30T22:00:31+00:00 app[web.1]: Completed 500 Internal Server Error in 0ms
2011-10-30T22:00:31+00:00 heroku[router]: GET .heroku.com/auth/twitter dyno=web.1 queue=0 wait=0ms service=7ms status=500 bytes=728
2011-10-30T22:00:31+00:00 app[web.1]:
2011-10-30T22:00:31+00:00 app[web.1]: NoMethodError (undefined method '[]' for nil:NilClass):
2011-10-30T22:00:31+00:00 app[web.1]: app/controllers/authentications_controller.rb:15:in `create'

On line 15
```ruby
authentication = Authentication.where(:provider => omniauth['provider'], :uid => omniauth['uid'])
```

I Don't know why happens this, if locally work correctly

Thank you