Skip to content

Instantly share code, notes, and snippets.

@adhusson
Created March 19, 2010 15:29
Show Gist options
  • Select an option

  • Save adhusson/337602 to your computer and use it in GitHub Desktop.

Select an option

Save adhusson/337602 to your computer and use it in GitHub Desktop.
Question.count
Mongo::MongoArgumentError: DB#command requires an OrderedHash when hash contains multiple keys
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongo-0.19.1/lib/../lib/mongo/db.rb:439:in `command'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongo-0.19.1/lib/../lib/mongo/cursor.rb:91:in `count'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/cursor.rb:35:in `send'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/cursor.rb:35:in `count'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/contexts/mongo.rb:48:in `count'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/criteria.rb:34:in `__send__'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/criteria.rb:34:in `count'
from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/finders.rb:30:in `count'
from (irb):38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment