chazen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-19 03:20 UTC
active record query_cache error -- wrong number of arguments
Hi, I''m getting the same error in query_cache.rb:75 (wrong number of arguments) while attempting to do either of two things - a database migration, or run a functional test on a controller. I am running rails revision 6168, and the error might be related to installed ezcrypto (revision 68), but removing all references to ezcrypto in my app does not make the problem go away. Does anyone have suggestions as to how I might better figure out what the problem is? I have spent literally hours on this. Reading the source for query_cache.rb seems to indicate that the failure is happening while Rails is selecting between cached active record queries and queries without caches. There are no files in tmp/cache. Here is a full output of the error: $ rake db:migrate VERSION=0 --trace (in /home/tc1/rails/cg) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == AddRootUser: reverting ====================================================rake aborted! wrong number of arguments (0 for 2) /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/query_cache.rb:75:in `hash'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/query_cache.rb:75:in `connection'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/base.rb:512:in `delete_all'' ./db/migrate//017_add_root_user.rb:20:in `down_without_benchmarks'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/migration.rb:212:in `migrate'' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/migration.rb:212:in `migrate'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/migration.rb:334:in `migrate'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/migration.rb:329:in `migrate'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/migration.rb:300:in `down'' /home/tc1/rails/cg/config/../vendor/rails/activerecord/lib/ active_record/migration.rb:289:in `migrate'' /home/tc1/rails/cg/config/../vendor/rails/railties/lib/tasks/ databases.rake:4 /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/bin/rake:16 cheers!!! Charlie --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
chazen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-19 15:10 UTC
Re: active record query_cache error -- wrong number of arguments
On Feb 18, 10:20 pm, "cha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <cha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m getting the same error in query_cache.rb:75 (wrong number of > arguments) while attempting to do either of two things - a database > migration, or run a functional test on a controller.I figured it out. In my model, I had a method named "hash", which accidentally overrode the built-in "hash", breaking everything. My mistake! -charlie --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---