Skip to content

Instantly share code, notes, and snippets.

@coolbrg
Created July 5, 2013 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coolbrg/5933873 to your computer and use it in GitHub Desktop.
Save coolbrg/5933873 to your computer and use it in GitHub Desktop.
Heroku logs on 'Saving problems'.
2013-07-05T11:16:09.177945+00:00 app[web.2]: Started PUT "/problems/51d6882c78c3f738fc000046" for 203.123.164.34 at 2013-07-05 11:16:09 +0000
2013-07-05T11:16:10.446408+00:00 app[web.2]:
2013-07-05T11:16:10.446408+00:00 app[web.2]: Mongoid::Errors::InvalidFind (
2013-07-05T11:16:10.446408+00:00 app[web.2]: Problem:
2013-07-05T11:16:10.446408+00:00 app[web.2]: Calling Document.find with nil is invalid.
2013-07-05T11:16:10.446408+00:00 app[web.2]: Summary:
2013-07-05T11:16:10.446408+00:00 app[web.2]: Document.find expects the parameters to be 1 or more ids, and will return a single document if 1 id is provided, otherwise an array of documents if multiple ids are provided.
2013-07-05T11:16:10.446408+00:00 app[web.2]: Resolution:
2013-07-05T11:16:10.446408+00:00 app[web.2]: Most likely this is caused by passing parameters directly through to the find, and the parameter either is not present or the key from which it is accessed is incorrect.):
2013-07-05T11:16:10.446408+00:00 app[web.2]: app/controllers/problems_controller.rb:159:in `block in merge_json_attributes'
2013-07-05T11:16:10.446408+00:00 app[web.2]: app/controllers/problems_controller.rb:158:in `map'
2013-07-05T11:16:10.446722+00:00 app[web.2]: app/controllers/problems_controller.rb:158:in `merge_json_attributes'
2013-07-05T11:16:10.446722+00:00 app[web.2]:
2013-07-05T11:16:10.446722+00:00 app[web.2]:
2013-07-05T11:16:10.451753+00:00 heroku[router]: at=info method=POST path=/problems/51d6882c78c3f738fc000046 host=ed-socrates.herokuapp.com fwd="203.123.164.34" dyno=web.2 connect=1ms service=4509ms status=500 bytes=643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment