when use mongoid , Model.count can't work.

Hi, when i use mongoid to get the count of model named "User", I met a
error :

irb(main):001:0> User.count

ArgumentError: wrong number of arguments (1 for 0)
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
cursor.rb:37:in `count'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
cursor.rb:37:in `send'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
cursor.rb:37:in `count'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
collections/retry.rb:29:in `retry_on_connection_failure'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
cursor.rb:36:in `count'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/contexts/
mongo.rb:73:in `count'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
criteria.rb:48:in `__send__'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
criteria.rb:48:in `count'
        from /var/lib/gems/1.8/gems/mongoid-2.0.2/lib/mongoid/
finders.rb:34:in `count'
        from (irb):2

version of mongoid is "2.0.2"
version of ruby is "1.8.7"
version of rails is "3.0.3"

Any suggestions/help?

Thanks!

Hi mate,

I can only advise you to update Ruby to 1.9.2 and rails to 3.0.9. You should have a look into rvm updater. You may want to try bundle install command first.

cc
Hi,Rafal ,your advice really helped me.I deleted the "mongo ,1.1.3 " in my Gemfile.it works.Thank u very much.