Closed bcoughlan closed 13 years ago
Windows XP with Rails 3.0.5, Ruby 1.8.6.
I see awesome_nested_set had the same issue, which was patched but no details were given: https://github.com/collectiveidea/awesome_nested_set/issues/closed#issue/22
seeds.rb: v=Video.create( :title=>'Introduction to Python', :filename=>'python.webm', :length=>2111) s1=Section.create( :video_id=>v.id, :title=>'Introduction to Lists', :length=>234) s2=Section.create( :video_id=>v.id, :title=>'FOR and IN', :length=>234) c=Section.create( :video_id=>v.id, :title=>'While loop', :length=>234) c.move_to_child_of(s2) c = Section.create( :video_id=>v.id, :title=>'Range', :length=>234, :index=>0)
rake db:seed --trace:
undefined method parent_id_changed?' for #<Section:0x32d39d8> C:/Ruby187/lib/ruby/gems/1.8/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:inmethod_missing' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:in method_missing' C:/Ruby187/lib/ruby/gems/1.8/gems/nested_set-1.6.4/lib/nested_set/base.rb:530:insend' C:/Ruby187/lib/ruby/gems/1.8/gems/nested_set-1.6.4/lib/nested_set/base.rb:530:in store_new_parent' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:429:in_run_save_callbacks' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/callbacks.rb:277:in create_or_update' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/persistence.rb:39:insave' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/validations.rb:43:in save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:21:insave' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:237:in save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:289:inwith_transaction_returning_status' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in transaction' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:204:intransaction' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:287:in with_transaction_returning_status' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:237:insave' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:248:in rollback_active_record_state!' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:236:insave' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:498:in create' C:/html5video/db/seeds.rb:15 C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:inload' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in load' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:inload_dependency' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in new_constants_in' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:inload_dependency' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in load' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:281 C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain' C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in synchronize' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/Ruby187/bin/rake:19:in `load' C:/Ruby187/bin/rake:19
parent_id_changed?' for #<Section:0x32d39d8> C:/Ruby187/lib/ruby/gems/1.8/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in
method_missing' C:/Ruby187/lib/ruby/gems/1.8/gems/nested_set-1.6.4/lib/nested_set/base.rb:530:in
store_new_parent' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:429:in
create_or_update' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/persistence.rb:39:in
save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:21:in
save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:289:in
transaction' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:204:in
with_transaction_returning_status' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:237:in
rollback_active_record_state!' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:236:in
create' C:/html5video/db/seeds.rb:15 C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in
load' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
new_constants_in' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
load' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:281 C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
synchronize' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
top_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
top_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
standard_exception_handling' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
Ah, apologies. I left parent_id, ltr and gft out of seeds.rb, I assumed they would be nil by default (newbie syndrome).
Ok. Never mind.
Windows XP with Rails 3.0.5, Ruby 1.8.6.
I see awesome_nested_set had the same issue, which was patched but no details were given: https://github.com/collectiveidea/awesome_nested_set/issues/closed#issue/22
seeds.rb: v=Video.create( :title=>'Introduction to Python', :filename=>'python.webm', :length=>2111) s1=Section.create( :video_id=>v.id, :title=>'Introduction to Lists', :length=>234) s2=Section.create( :video_id=>v.id, :title=>'FOR and IN', :length=>234) c=Section.create( :video_id=>v.id, :title=>'While loop', :length=>234) c.move_to_child_of(s2) c = Section.create( :video_id=>v.id, :title=>'Range', :length=>234, :index=>0)
rake db:seed --trace:
undefined method
parent_id_changed?' for #<Section:0x32d39d8> C:/Ruby187/lib/ruby/gems/1.8/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in
method_missing' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:inmethod_missing' C:/Ruby187/lib/ruby/gems/1.8/gems/nested_set-1.6.4/lib/nested_set/base.rb:530:in
send' C:/Ruby187/lib/ruby/gems/1.8/gems/nested_set-1.6.4/lib/nested_set/base.rb:530:instore_new_parent' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:429:in
_run_save_callbacks' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/callbacks.rb:277:increate_or_update' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/persistence.rb:39:in
save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/validations.rb:43:insave' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:21:in
save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:237:insave' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:289:in
with_transaction_returning_status' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/database_statements.rb:139:intransaction' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:204:in
transaction' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:287:inwith_transaction_returning_status' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:237:in
save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:248:inrollback_active_record_state!' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:236:in
save' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:498:increate' C:/html5video/db/seeds.rb:15 C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in
load' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:inload' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
load_dependency' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:innew_constants_in' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
load_dependency' C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:inload' C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:281 C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' C:/Ruby187/lib/ruby/1.8/monitor.rb:242:insynchronize' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
each' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
run' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run' C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/Ruby187/bin/rake:19:in `load' C:/Ruby187/bin/rake:19