First, I do simple squeel testing in the Rails console.
User.where{name == "abc"}
There is no problem for new-created Ruby project
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'abc' => []
However, when I apply it on my existing project, it gives me error message:
1.9.3p125 :001 > User.where{name == "abc"}
ArgumentError: wrong number of arguments (0 for 1) from /Users/xxx/.rvm/gems/ruby-1.9.3-p125/gems/parse_resource-1.7.3/lib/parse_resource/query.rb:11:in `where'
from /Users/xxx/.rvm/gems/ruby-1.9.3-p125/gems/parse_resource-1.7.3/lib/parse_resource/base.rb:243:in `where'
from (irb):1
from /Users/xxx/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start'
from /Users/xxx/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start'
from /Users/xxx/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
The most-related issue I found is Squeel issue #193.
It says that Squeel is not loaded. But, in my case, new-created can be implemented in the same machine.
Anyway, I try to change active_record.rb as it stated, but the problem is still here for my existing project.
I'm using Ruby-1.9.3-p125, Rails v3.2.6, and Squeel 1.0.14.