#122 new
Dries Steenhouwer

wrong number of arguments (1 for 0) - Ruby 1.9

Reported by Dries Steenhouwer | March 9th, 2010 @ 06:17 AM

Hello,

I just ipdated Ruby from 1.8 to 1.9 and now I'm having some problems with the searchlogic gem. Here you can find the problem :

ArgumentError in ProductsController#index

wrong number of arguments (1 for 0)

Full trace

/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in call'

/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in block in named_scope'

/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:97:in call'

/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:97:in block (2 levels) in named_scope'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/named_scopes/association_conditions.rb:47:in association_condition_options'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/named_scopes/association_conditions.rb:42:in create_association_condition'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/named_scopes/association_conditions.rb:16:in method_missing'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/named_scopes/association_ordering.rb:27:in method_missing'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/named_scopes/ordering.rb:30:in method_missing'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/named_scopes/or_conditions.rb:28:in method_missing'

/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/base.rb:1959:in method_missing'

/usr/local/lib/ruby/gems/1.9.1/gems/mislav-will_paginate-2.3.11/lib/will_paginate/finder.rb:170:in method_missing_with_paginate'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:151:in cast_type'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:88:in method_missing'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:67:in block in conditions='

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:64:in each'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:64:in conditions='

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:50:in initialize'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:25:in new'

/usr/local/lib/ruby/gems/1.9.1/gems/searchlogic-2.3.11/lib/searchlogic/search.rb:25:in searchlogic'

/home/dries/Projects/cloud/app/controllers/products_controller.rb:62:in get_menu_items'

Params

{"brand"=>"japan-rags"}

On line 62 in my products controller I have this code :

product_type_search = ProductType.searchlogic(:products_active => true, :products_on_sale => true, :products_available_for_gallery => true)

Why does this go wrong in Ruby 1.9?

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket

Pages