yamldb / yaml_db

Rails plugin for a database-independent dump format, data.yml .......... Seeking new maintainers! See https://github.com/yamldb/yaml_db/issues/143
https://rubygems.org/gems/yaml_db
949 stars 199 forks source link

undefined method `[]=' for #<ActiveRecord::Result:0x47bb570> #64

Closed jrock2004 closed 9 years ago

jrock2004 commented 10 years ago

Trying to do a dump and this is what I am getting

C:\Development\rails\automation_metrics_tool>rake db:data:dump --trace * Invoke db:data:dump (first_time) * Invoke environment (first_time) * Execute environment * Execute db:data:dump rake aborted! undefined method []=' for #<ActiveRecord::Result:0x47bb570> C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:10 8:inblock in unhash_records' C:/Ruby200/lib/ruby/gems/2.0.0/gems/activerecord-4.1.0.rc1/lib/active_record/res ult.rb:55:in block in each' C:/Ruby200/lib/ruby/gems/2.0.0/gems/activerecord-4.1.0.rc1/lib/active_record/res ult.rb:55:ineach' C:/Ruby200/lib/ruby/gems/2.0.0/gems/activerecord-4.1.0.rc1/lib/active_record/res ult.rb:55:in each' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:10 7:ineach_with_index' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:10 7:in unhash_records' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/yaml_db.rb:47:inblock in dump_table_records' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:18 7:in block in each_table_page' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:18 3:ineach' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:18 3:in each_table_page' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/yaml_db.rb:46:indump_tab le_records' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:16 8:in dump_table' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:15 1:inblock in dump' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:14 9:in each' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:14 9:indump' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:14 :in dump' C:/Ruby200/lib/ruby/gems/2.0.0/gems/yaml_db-0.2.3/lib/tasks/yaml_db_tasks.rake:2 1:inblock (3 levels) in <top (required)>' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:236:in call' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:236:inblock i n execute' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:231:in each' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:231:inexecute ' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:175:in block i n invoke_with_call_chain' C:/Ruby200/lib/ruby/2.0.0/monitor.rb:211:inmonsynchronize' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke with_call_chain' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/task.rb:161:in`invoke'

C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:149:in invoke_task' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in block (2 levels) in top_level' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in each' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:106:in block in top_level' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:115:in run_with_threads' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:100:in top_level' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:78:in b lock in run' C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.1/lib/rake/application.rb:165:in standard_exception_handling'

mikbe commented 10 years ago

Use this updated version instead: https://github.com/turgu1/yaml_db

I would actually suggest forking it into your own account so you don't have to worry about them deleting their account (it's happened to me before).

dnrce commented 9 years ago

Duplicate of #54 (addressed in #45)