{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/d91b2b7d5587aa8432f34727e1e6f57f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d91b2b7d5587aa8432f34727e1e6f57f","url":"https://api.github.com/users/randika","login":"randika","id":120092},"milestone":null,"assignee":null,"updated_at":"2011-11-07T23:11:54Z","labels":[],"comments":0,"closed_at":null,"url":"https://api.github.com/repos/stackmob/stackmob-ruby/issues/4","body":"Hi, \r\nI'm working on a rails3.1 app to work with the stackmob REST API. Here is my app environment\r\ndevelopment:\r\nUbuntu 11.04, Ruby 1.9.2, Rails 3.1\r\nProduction: \r\nHeroku Cedar stack\r\n\r\n### From the docs (accessed 07-Nov-2011)\r\n<pre>\r\nDeploying your Heroku application only requires one additional step. After you have pushed your changes to Heroku you will need to run:\r\n\r\nheroku run rake stackmob:deploy\r\n</pre>\r\n\r\nDoes this command still in use? Every time I ran this I get an error: (see below)\r\n\r\n<pre>\r\nRunning rake stackmob:deploy attached to terminal... up, run.4 Failed to register application. Unable to Communicate with stackmob.com or Authenticate. Please check your keys in config/stack mob.yml and try again \r\n</pre>\r\n\r\nBut everything works from rails console and rails web app on development mode.\r\n\r\nAfter running above deploy command, the <myapp>.herokuapp.com throw a new error. (see below)\r\n\r\n<pre>Internal Server Error undefined method `each' for \"Not Authorized\\n\":String</pre>\r\n\r\n\r\nSo the whole thing looks working well on production mode (heroku). So I did a trick (for now), I forked the gem and change this file.\r\nlib/stackmob/rack/simple_oauth_provider.rb\r\n```def auth_failed(env)\r\n        if pass_through?\r\n          authorized(env)\r\n        else\r\n          [401, {}, \"Not Authorized\\n\"] # Replaced this line with  authorized(env)\r\n        end\r\n      end\r\n```\r\nSo now on heroku, the app works. What might be the issue here?","html_url":"https://github.com/stackmob/stackmob-ruby/issues/4","number":4,"title":"Heroku deployment errors","id":2168922,"created_at":"2011-11-07T23:11:54Z"},"action":"opened"}