Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Broken methods for habtm relation on thin webserver

#2332

On a habtm relation some methods like "each" and "delete" dont work, but just for the thin webserver.

I got the following message: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.include?

With the following trace: /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:142:in create_time_zone_conversion_attribute?' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:75:indefine_attribute_methods' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:71:in each' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:71:indefine_attribute_methods' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:242:in method_missing

Example source: instance.comments.delete(@comment)

Where instance is a class with habtm relation, comments is the relation and @comment is a instance of a comment.

In console, functional test and mongrel it works. But I still think its 2.3 related and not a true thin server problem.

Reported by geno · March 25th, 2009 @ 12:08 AM

State: invalid
Milestone: 2.x
Assigned to: Ryan Bigg Ryan Bigg
Importance: none

Activity

  1. David Trasbo
    David Trasbo
    • Assigned user set to Ryan Bigg

    Inconceivable. I see know way this could be related to Thin. Detailed information on what the problem is and how to duplicate it (if it even exists) are necessary. This can be marked as invalid.

    April 15th, 2010 @ 08:45 PM

  2. Ryan Bigg
    Ryan Bigg
    • State changed from new to invalid

    I don't see how Thin would effect the running of AR. Please leave a comment if this is still an issue.

    April 15th, 2010 @ 10:54 PM

  3. bingbing