Erreur de migration vers la version 3.1.2

Bonjour, je migre fabmanager vers la dernière version, j’ai un problème avec la mise à jour v 3.1.2 dans TODO DEPLOY, dès que j’exécute la commande "docker-compose exec fabmanager bundle exec rake fablab: setup: add_vat_rate [20,2017-01-01 ] "ce message d’erreur apparaît ci-dessous:

rake aborted!
NoMethodError: undefined method `footprint=' for #<HistoryValue:0x000055e104deb8                                                                                        78>
/usr/local/bundle/gems/activemodel-4.2.11.1/lib/active_model/attribute_methods.r                                                                                        b:433:in `method_missing'
/usr/src/app/app/models/history_value.rb:13:in `chain_record'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:43                                                                                        2:in `block in make_lambda'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:22                                                                                        8:in `block in halting_and_conditional'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:50                                                                                        6:in `block in call'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:50                                                                                        6:in `each'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:50                                                                                        6:in `call'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:92                                                                                        :in `_run_callbacks_'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:77                                                                                        8:in `_run_create_callbacks'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/callbacks.rb:306:                                                                                        in `_create_record'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/timestamp.rb:57:i                                                                                        n `_create_record'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/persistence.rb:50                                                                                        4:in `create_or_update'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/callbacks.rb:302:                                                                                        in `block in create_or_update'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:11                                                                                        7:in `call'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:55                                                                                        5:in `block (2 levels) in compile'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:50                                                                                        5:in `call'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:92                                                                                        :in `_run_callbacks_'
/usr/local/bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:77                                                                                        8:in `_run_save_callbacks'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/callbacks.rb:302:                                                                                        in `create_or_update'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/persistence.rb:14                                                                                        2:in `save!'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/validations.rb:43                                                                                        :in `save!'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/attribute_methods                                                                                        /dirty.rb:29:in `save!'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:2                                                                                        91:in `block in save!'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:3                                                                                        51:in `block in with_transaction_returning_status'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapte                                                                                        rs/abstract/database_statements.rb:213:in `block in transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapte                                                                                        rs/abstract/transaction.rb:184:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapte                                                                                        rs/abstract/database_statements.rb:213:in `transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:2                                                                                        20:in `transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:3                                                                                        48:in `with_transaction_returning_status'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:2                                                                                        91:in `save!'
/usr/local/bundle/gems/protected_attributes-1.1.3/lib/active_record/mass_assignm                                                                                        ent_security/validations.rb:17:in `create!'
/usr/src/app/lib/tasks/fablab/setup.rake:74:in `block (3 levels) in <top (requir                                                                                        ed)>'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with                                                                                        _call_chain'
/usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_cha                                                                                        in'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 leve                                                                                        ls) in top_level'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_                                                                                        level'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_thre                                                                                        ads'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exce                                                                                        ption_handling'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/cli.rb:463:in `exec'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor/command.rb:27:i                                                                                        n `run'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor/invocation.rb:1                                                                                        26:in `invoke_command'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor.rb:387:in `disp                                                                                        atch'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/cli.rb:27:in `dispatch'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor/base.rb:466:in                                                                                         `start'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/cli.rb:18:in `start'
/usr/local/bin/bundle:30:in `block in <main>'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/friendly_errors.rb:124:in `with_frie                                                                                        ndly_errors'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => fablab:setup:add_vat_rate

Gostaria de um auxilio para resolver esse problema

Desde já Agradeço.

Hello,

Can you try running the following command first?

docker-compose exec fabmanager bundle exec rake db:migrate
```

Hi @Sylvain,

was the same as mine, And worked very well!

So I continued the process, until 4.5.9.

When we were on the 4.5.9 TODO DEPLOY, the cmd: docker-compose exec fabmanager bundle exec rails fablab:maintenance:regenerate_invoices[2019,10] gave us the error:

rails aborted!
NoMethodError: undefined method `history_values' for nil:NilClass
/usr/src/app/app/models/invoice.rb:43:in `filename'
/usr/src/app/app/models/invoice.rb:39:in `file'
/usr/src/app/app/models/invoice.rb:72:in `regenerate_invoice_pdf'
/usr/local/bundle/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/usr/src/app/lib/tasks/fablab/maintenance.rake:16:in `block (3 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:279:in `block in execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:279:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:279:in `execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/command.rb:48:in `invoke'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/commands.rb:18:in `<main>'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/usr/local/bundle/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `block in require'
/usr/local/bundle/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => fablab:maintenance:regenerate_invoices

Would be the migrate cmd again?

Bon après-midi @sylvain

Merci beaucoup pour l’astuce, cela a parfaitement fonctionné avec l’astuce que vous m’avez donnée, je suis sur la version 4.5.9 et quand j’exécute TODO DEPLOY: docker-compose exec fabmanager bundle exec rails fablab: maintenance: regenerate_invoices [2019,10] l’erreur suivante apparaît:

rails aborted!
NoMethodError: undefined method `history_values' for nil:NilClass
/usr/src/app/app/models/invoice.rb:43:in `filename'
/usr/src/app/app/models/invoice.rb:39:in `file'
/usr/src/app/app/models/invoice.rb:72:in `regenerate_invoice_pdf'
/usr/local/bundle/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/usr/src/app/lib/tasks/fablab/maintenance.rake:16:in `block (3 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:279:in `block in execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:279:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:279:in `execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/command.rb:48:in `invoke'
/usr/local/bundle/gems/railties-5.2.4.4/lib/rails/commands.rb:18:in `<main>'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/usr/local/bundle/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `block in require'
/usr/local/bundle/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => fablab:maintenance:regenerate_invoices

Merci d’avance pour l’aide et le soutien précieux que vous donnez !!!

Hi to both of you,

Maybe you need to run this command:

docker-compose exec fabmanager bundle exec rake db:seed

merci @silvian cela a parfaitement fonctionné avec votre astuce, maintenant je passe à la version 4.6.0 sur la dernière commande lorsque j’exécute "\ curl -sSL https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/mount-webpack .sh | bash "renvoie le message suivant:

Checking user… /usr/bin/awk
${PWD}/public/assets:/usr/src/app/public/assets
Volume #0 was replaced for fabmanager: /assets changed to /packs

J’apprécierais que vous m’aidiez avec ce problème :slight_smile:

@Sylvain Consegui consegui resolver o problema seguindo o topico:

Problème d'update - #2 par Sylvain.

desde já obrigado! :wink:

ce message n’est pas une erreur, il indique au contraire que tout s’est bien déroulé.

Parfait! merci @Sylvain :wink: