{"issue":{"created_at":"2011-10-30T22:19:50Z","state":"closed","updated_at":"2011-12-08T01:45:39Z","comments":6,"user":{"gravatar_id":"3c3887b1db529c83229af9f76611fa18","id":628513,"url":"https://api.github.com/users/deivinsontejeda","avatar_url":"https://secure.gravatar.com/avatar/3c3887b1db529c83229af9f76611fa18?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"deivinsontejeda"},"body":"Hello Guys,\r\n\r\nI have following error when deploy my app on heroku\r\n\r\n2011-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\r\n2011-10-30T22:00:31+00:00 app[web.1]:   Processing by AuthenticationsController#create as HTML\r\n2011-10-30T22:00:31+00:00 app[web.1]:   Parameters: {\"success\"=>true, \"provider\"=>\"twitter\"}\r\n2011-10-30T22:00:31+00:00 app[web.1]: Completed 500 Internal Server Error in 0ms\r\n2011-10-30T22:00:31+00:00 heroku[router]: GET <app>.heroku.com/auth/twitter dyno=web.1 queue=0 wait=0ms service=7ms status=500 bytes=728\r\n2011-10-30T22:00:31+00:00 app[web.1]: \r\n2011-10-30T22:00:31+00:00 app[web.1]: NoMethodError (undefined method '[]' for nil:NilClass):\r\n2011-10-30T22:00:31+00:00 app[web.1]:   app/controllers/authentications_controller.rb:15:in `create'\r\n\r\nOn line 15 \r\n```ruby\r\nauthentication = Authentication.where(:provider => omniauth['provider'], :uid => omniauth['uid']).first\r\n```\r\n\r\nI Don't know why happens this, if locally works correctly\r\n\r\nThank you\r\n\r\n","assignee":null,"id":2092477,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":5,"title":"NoMethodError (undefined method `[]' for nil:NilClass):","html_url":"https://github.com/fertapric/rails3-mongoid-devise-omniauth/issues/5","closed_at":"2011-12-08T00:22:20Z","url":"https://api.github.com/repos/fertapric/rails3-mongoid-devise-omniauth/issues/5","milestone":null},"action":"created","comment":{"created_at":"2011-12-08T01:45:39Z","updated_at":"2011-12-08T01:45:39Z","user":{"gravatar_id":"88c7a6d0feb5151f6e489b44fdeef9a7","id":219799,"url":"https://api.github.com/users/tario","avatar_url":"https://secure.gravatar.com/avatar/88c7a6d0feb5151f6e489b44fdeef9a7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"tario"},"body":"Thankyou for the tip, but I have already setted the configuration https://github.com/tario/openid-auth-sample/blob/heroku/config/initializers/omniauth.rb#L5 (heroku branch on that repo), the host works fine, the problem is on sessions_controller after returning for the identity provider. This is the app on heroku: http://warm-moon-7086.heroku.com/","id":3056678,"url":"https://api.github.com/repos/fertapric/rails3-mongoid-devise-omniauth/issues/comments/3056678"}}