Ruby on Rails
Monday, July 4, 2011
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" <rockliu2009@gmail.com> 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 rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
-- > 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 rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment