#33 ✓resolved
Prometheus

nil errors after upgrading to Rails 2.2

Reported by Prometheus | November 27th, 2008 @ 01:23 PM

I recently upgraded to Rails 2.2.2. I had Searchgasm running just perfectly, and started getting this error in my controller.

I tried upgrading to the latest version of searchlogic, to no avail.

NoMethodError in MattersController#index

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.klass
vendor/rails/activerecord/lib/active_record/reflection.rb:244:in source_reflection' vendor/rails/activerecord/lib/active_record/reflection.rb:244:incollect'
vendor/rails/activerecord/lib/active_record/reflection.rb:244:in source_reflection' vendor/rails/activerecord/lib/active_record/reflection.rb:303:inderive_class_name'
vendor/rails/activerecord/lib/active_record/reflection.rb:107:in class_name' vendor/plugins/searchlogic/lib/searchlogic/conditions/base.rb:269:inadd_associations!'
vendor/plugins/searchlogic/lib/searchlogic/conditions/base.rb:263:in each' vendor/plugins/searchlogic/lib/searchlogic/conditions/base.rb:263:inadd_associations!'
vendor/plugins/searchlogic/lib/searchlogic/conditions/base.rb:151:in initialize' vendor/plugins/searchlogic/lib/searchlogic/search/conditions.rb:17:innew'
vendor/plugins/searchlogic/lib/searchlogic/search/conditions.rb:17:in initialize' vendor/plugins/searchlogic/lib/searchlogic/active_record/base.rb:140:innew'
vendor/plugins/searchlogic/lib/searchlogic/active_record/base.rb:140:in searchlogic_search' vendor/plugins/searchlogic/lib/searchlogic/active_record/base.rb:65:innew_search'
vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:370:in send' vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:370:inmethod_missing'
vendor/rails/activerecord/lib/active_record/base.rb:2003:in with_scope_without_searchlogic' vendor/plugins/searchlogic/lib/searchlogic/active_record/base.rb:47:inwith_scope'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:202:in send' vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:202:inwith_scope'
vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:366:in method_missing' app/controllers/matters_controller.rb:9:inindex'
-e:2:in `load' -e:2

Comments and changes to this ticket

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