This project is archived and is in readonly mode.
Broken methods for habtm relation on thin webserver
Reported by geno | March 25th, 2009 @ 12:08 AM | in 2.x
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:in
define_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:in
define_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.
Comments and changes to this ticket
-
David Trasbo April 15th, 2010 @ 08:45 PM
- 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.
-
Ryan Bigg April 15th, 2010 @ 10:54 PM
- 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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>