find fails

Narihiro Nakamura's Avatar

Narihiro Nakamura

09 Dec, 2008 05:28 AM

Hi. I had found maybe bug.

--------------- (start) ------------------ Loading development environment (Rails 2.1.1)

Node.find(:first, :include => [{‘node_type’ => ‘device_type’}], :conditions => “device_types.id = 833714872”) NoMethodError: You have a nil object when you didn’t expect it! The error occurred while evaluating nil.macro from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1643:in remove_duplicate_results!’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1641:ineach’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1641:in remove_duplicate_results!’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1638:inremove_duplicate_results!’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1637:in each’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1637:inremove_duplicate_results!’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1625:in instantiate’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1261:infind_with_associations’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1258:in catch’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/associations.rb:1258:infind_with_associations’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1343:in find_every’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1307:infind_initial’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:538:in find’ from (irb):1 --------------- (end) ------------------

fixed this bug patch is here. http://github.com/authorNari/rails/commit/93c0a49d0b59f723787652dec607404609fad89b#diff-0

thanks.

  1. 1 Posted by Will Duncan on 09 Dec, 2008 08:12 AM

    Will Duncan's Avatar

    I believe this is in the wrong Tender account.

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac