yamldb/yaml_db

Rails 5.1 support

laiskajoonas opened this issue · 0 comments

I'm getting the following error when trying to run rails db:data:dump with a rails 5.1 project:

rails aborted!
NoMethodError: undefined method `[]=' for #<ActiveRecord::Result:0x0055793d942170>
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:108:in `block in unhash_records'
/var/lib/gems/2.3.0/gems/activerecord-5.1.0/lib/active_record/result.rb:55:in `block in each'
/var/lib/gems/2.3.0/gems/activerecord-5.1.0/lib/active_record/result.rb:55:in `each'
/var/lib/gems/2.3.0/gems/activerecord-5.1.0/lib/active_record/result.rb:55:in `each'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:107:in `each_with_index'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:107:in `unhash_records'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/yaml_db.rb:47:in `block in dump_table_records'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:187:in `block in each_table_page'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:183:in `each'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:183:in `each_table_page'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/yaml_db.rb:46:in `dump_table_records'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:168:in `dump_table'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:151:in `block in dump'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:149:in `each'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:149:in `dump'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/serialization_helper.rb:14:in `dump'
/var/lib/gems/2.3.0/gems/yaml_db-0.2.3/lib/tasks/yaml_db_tasks.rake:21:in `block (3 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/command.rb:46:in `invoke'
/var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/commands.rb:16:in `<top (required)>'
/home/jr/mvam/bin/rails:11:in `require'
/home/jr/mvam/bin/rails:11:in `<top (required)>'

I tried using from master but it seems that there is a compatibility issue and the gem is restricted to be used on <5.1.

yaml_db was resolved to 0.5.0, which depends on
     rails (< 5.1, >= 3.0)