Skip to content

Instantly share code, notes, and snippets.

@helloluis
Created July 17, 2011 09:54
Show Gist options
  • Save helloluis/1087411 to your computer and use it in GitHub Desktop.
Save helloluis/1087411 to your computer and use it in GitHub Desktop.
NoMethodError (undefined method `has_key?' for "dog":String):
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/attributes.rb:149:in `block (2 levels) in apply_default_attributes'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/attributes.rb:148:in `each_pair'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/attributes.rb:148:in `block in apply_default_attributes'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/attributes.rb:147:in `tap'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/attributes.rb:147:in `apply_default_attributes'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/document.rb:262:in `block in instantiate'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/document.rb:260:in `tap'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/document.rb:260:in `instantiate'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/factory.rb:34:in `from_db'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/builders/embedded/many.rb:24:in `block (2 levels) in build'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/builders/embedded/many.rb:23:in `tap'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/builders/embedded/many.rb:23:in `block in build'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/builders/embedded/many.rb:22:in `each'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/builders/embedded/many.rb:22:in `inject'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/builders/embedded/many.rb:22:in `build'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/accessors.rb:59:in `create_relation'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/accessors.rb:26:in `build'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/relations/accessors.rb:131:in `block (2 levels) in getter'
activemodel (3.0.4) lib/active_model/serialization.rb:88:in `block in serializable_hash'
activemodel (3.0.4) lib/active_model/serialization.rb:87:in `each'
activemodel (3.0.4) lib/active_model/serialization.rb:87:in `inject'
activemodel (3.0.4) lib/active_model/serialization.rb:87:in `serializable_hash'
/Users/luis/.rvm/gems/ruby-1.9.2-p0/bundler/gems/mongoid-6bd8077ea91e/lib/mongoid/serialization.rb:31:in `serializable_hash'
activemodel (3.0.4) lib/active_model/serializers/json.rb:84:in `as_json'
app/helpers/monitors_helper.rb:377:in `jsonify'
app/controllers/sites_controller.rb:142:in `block (3 levels) in stream'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment