cc
Hi,Rafal ,your advice really helped me.I deleted the "mongo ,1.1.3 " in my
Gemfile.it works.Thank u very much.
2011/7/4 Rafal Zdziech <[email protected]>

> 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.
> On 4 Jul 2011 07:20, "Rock Liu" <[email protected]> wrote:
> > 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!
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected].
> > For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to