Database Migration of old version to the lastest of fabmanager

Hi Sylvain, sorry about delay!

I have upgraded the database postgree to 9.6 (everything looked good on upgrade process script)

But when I tried to up the system I got the error on postgree docker container:

PostgreSQL Database directory appears to contain a database; Skipping initialization

LOG:  database system was shut down at 2020-09-22 14:24:06 UTC


LOG:  MultiXact member wraparound protections are now enabled


LOG:  database system is ready to accept connections


LOG:  autovacuum launcher started


ERROR:  relation "history_values" does not exist at character 566


STATEMENT:                SELECT a.attname, format_type(a.atttypid, a.atttypmod),


	                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,


	                     c.collname, col_description(a.attrelid, a.attnum) AS comment


	                FROM pg_attribute a


	                LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum


	                LEFT JOIN pg_type t ON a.atttypid = t.oid


	                LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation


	               WHERE a.attrelid = '"history_values"'::regclass


	                 AND a.attnum > 0 AND NOT a.attisdropped


	               ORDER BY a.attnum


	


FATAL:  terminating connection due to unexpected postmaster exit


FATAL:  terminating connection due to unexpected postmaster exit




PostgreSQL Database directory appears to contain a database; Skipping initialization




LOG:  database system was interrupted; last known up at 2020-09-22 14:24:19 UTC


LOG:  database system was not properly shut down; automatic recovery in progress


LOG:  invalid record length at 0/58085610: wanted 24, got 0


G:  redo is not required


LOG:  MultiXact member wraparound protections are now enabled


LOG:  database system is ready to accept connections


LOG:  autovacuum launcher started


ERROR:  relation "history_values" does not exist at character 566


STATEMENT:                SELECT a.attname, format_type(a.atttypid, a.atttypmod),


	                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,


	                     c.collname, col_description(a.attrelid, a.attnum) AS comment


	                FROM pg_attribute a


	                LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum


	                LEFT JOIN pg_type t ON a.atttypid = t.oid


	                LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation


	               WHERE a.attrelid = '"history_values"'::regclass


	                 AND a.attnum > 0 AND NOT a.attisdropped


	               ORDER BY a.attnum

Do you know What could be?

should I continue with the fabmanager upgrade anyway?

The database seems to startup correctly (see LOG: database system is ready to accept connections). Then comes the issue ERROR: relation "history_values" does not exist at character 566. If think this can be fixed with the following:

docker-compose run --rm fabmanager bundle exec rake db:migrate

Nice!

Running the cmd, I got this:

docker-compose run --rm fabmanager bundle exec rake db:migrate

Starting fabmanager_redis_1         ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_redis_1         ... done
Starting fabmanager_postgres_1      ... done
  AuthProvider Load (1.3ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
  AuthProvider Load (1.0ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
2020-09-23T17:48:45.803Z pid=1 tid=gq47wfm6d middleware=SidekiqUniqueJobs::Clien                                                                                                                                                             t::Middleware unique_digest=uniquejobs:86311f9a63c73dba95cf40e8c8a07b12 INFO: Ad                                                                                                                                                             ding dead VersionCheckWorker job fad3c0e49f29344bd32bce0d
  AuthProvider Load (0.8ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
  AuthProvider Load (1.6ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
   (286.0ms)  CREATE TABLE "ar_internal_metadata" ("key" character varying NOT N                                                                                                                                                             ULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "up                                                                                                                                                             dated_at" timestamp NOT NULL)
   (10.6ms)  SELECT pg_try_advisory_lock(367513146985461015)
   (16.1ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER                                                                                                                                                              BY "schema_migrations"."version" ASC
Migrating to RenameExpiredAtToExpirationDateFromSubscription (20181210105917)
   (1.6ms)  BEGIN
== 20181210105917 RenameExpiredAtToExpirationDateFromSubscription: migrating ==
-- rename_column(:subscriptions, :expired_at, :expiration_date)
   (47.0ms)  ALTER TABLE "subscriptions" RENAME COLUMN "expired_at" TO "expirati                                                                                                                                                             on_date"
   -> 0.0555s
== 20181210105917 RenameExpiredAtToExpirationDateFromSubscription: migrated (0.0                                                                                                        bundler: command not found: c
Install missing gem executables with `bundle install`
root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exec rake db:migrate --trace
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_redis_1         ... done
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
2020-09-23T17:54:46.397Z pid=1 tid=gnpe8bthx middleware=SidekiqUniqueJobs::Client::Middleware unique_digest=uniquejobs:86311f9a63c73dba95cf40e8c8a07b12 INFO: Adding dead VersionCheckWorker job e32da1c6926854392b54dbe7
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
  AuthProvider Load (1.4ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
** Execute db:load_config
** Execute db:migrate
   (0.5ms)  SELECT pg_try_advisory_lock(367513146985461015)
   (1.1ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Migrating to MigrateSettingsValueToHistoryValues (20181217103441)
   (1.8ms)  BEGIN
== 20181217103441 MigrateSettingsValueToHistoryValues: migrating ==============
  User Load (4.9ms)  SELECT  "users".* FROM "users" INNER JOIN "users_roles" ON "users_roles"."user_id" = "users"."id" INNER JOIN "roles" ON "roles"."id" = "users_roles"."role_id" WHERE (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) ORDER BY "users"."id" ASC LIMIT $1  [["LIMIT", 1]]
  Setting Load (7.5ms)  SELECT "settings".* FROM "settings"
   (0.7ms)  ROLLBACK
   (0.8ms)  SELECT pg_advisory_unlock(367513146985461015)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

unknown attribute 'user' for HistoryValue.
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:53:in `_assign_attribute'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:44:in `block in _assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `each'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `_assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:315:in `initialize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:7:in `block in up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:6:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:817:in `exec_migration'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/usr/local/lib/ruby/2.6.0/benchmark.rb:293:in `measure'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:797:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:796:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:977:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/transactions.rb:212:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1036:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1011:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281: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/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-13.0.1/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/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'

Caused by:
ActiveModel::UnknownAttributeError: unknown attribute 'user' for HistoryValue.
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:53:in `_assign_attribute'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:44:in `block in _assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `each'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `_assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:315:in `initialize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:7:in `block in up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:6:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:817:in `exec_migration'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/usr/local/lib/ruby/2.6.0/benchmark.rb:293:in `measure'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:797:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:796:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:977:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/transactions.rb:212:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1036:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1011:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281: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/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-13.0.1/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/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate

and the aplication is still down.

Hi @Sergio, can you tell me what was your previous version fo Fab-manager and what’s the current one?

Sure!

2.6.7

I have never Upgraded it! Better now, than never !:sweat_smile:

actually the database of fabamanger has a lot of user registrations (around 2k now, in 1 year), and We always was afraid of something get wrong on the upgrade process (like today), but now we have a testing eviroment, so it is safier.

Hi @Sylvain, In another attempt to have upgrade, I made pull from my image and tried to upgrade from 2.6.7 to 2.7.0, then keep going step by step until the newest version, but I got some issues that make the system be down.

First I changed the docker-compose.yml to v2.7.0

...
 fabmanager:
    image: sleede/fab-manager:release-v2.7.0
    environment:
...

And I followed the procedure (from here):

go to your app folder

cd /apps/fabmanager

pull last docker images

docker-compose pull

stop the app

docker-compose stop fabmanager

remove old assets

rm -Rf public/assets/

compile new assets

docker-compose run --rm fabmanager bundle exec rails assets:precompile (here would be "rake" or "rails"?)

then here the results:

 docker-compose pull
Pulling postgres      ... done
Pulling elasticsearch ... done
Pulling redis         ... done
Pulling fabmanager    ... done
Pulling nginx         ... done
root@FABLABTESTE:/apps/fabmanager# docker-compose stop fabmanager
Stopping fabmanager_fabmanager_1 ... done
root@FABLABTESTE:/apps/fabmanager# rm -Rf public/assets/
root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exe                                                                                                                                                             c rails assets:precompile
Starting fabmanager_redis_1 ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_postgres_1      ... done
Error: Command 'assets:precompile' not recognized
Did you mean: `$ rake assets:precompile` ?

Usage: rails COMMAND [ARGS]

The most common rails commands are:
 generate    Generate new code (short-cut alias: "g")
 console     Start the Rails console (short-cut alias: "c")
 server      Start the Rails server (short-cut alias: "s")
 dbconsole   Start a console for the database specified in config/database.yml
             (short-cut alias: "db")
 new         Create a new Rails application. "rails new my_app" creates a
             new application called MyApp in "./my_app"

In addition to those, there are:
 destroy      Undo code generated with "generate" (short-cut alias: "d")
 plugin new   Generates skeleton for developing a Rails plugin
 runner       Run a piece of code in the application environment (short-cut alia                                                                                                                                                             s: "r")

All commands can be run with -h (or --help) for more information.
root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exe                                                                                                                                                             c rake assets:precompile
Starting fabmanager_redis_1 ... done
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (0.6ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (0.5ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (1.3ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
I, [2020-09-28T17:13:20.533029 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-logo-439bcddddc31b3a30044f1556f843eab.png
I, [2020-09-28T17:13:20.537035 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-w-00412c9ebdbe51f6c6e22230757cab94.png
I, [2020-09-28T17:13:20.539947 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-b187dd3d2e2cbbcfd9df979853d72327.jpg
I, [2020-09-28T17:13:20.542689 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-1c6db71e84bfcdf219828524a0b30d83.png
I, [2020-09-28T17:13:20.545245 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /favicons/favicon-b24ed6574e1d37b025b17f5330704a0b.ico
I, [2020-09-28T17:13:20.548185 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fleche-left-37ebe9657a30085f4b2b9bf6d185d040.png
I, [2020-09-28T17:13:20.551411 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /la_casemate-logo-8f8a5f9062fe9d404f24c5eb5d36e61b.png
I, [2020-09-28T17:13:20.554454 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /mastercard-cba3078d24cb85be6fb26cd3766d8dff.png
I, [2020-09-28T17:13:20.557166 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /no_avatar-4ed257f03d2cdc53ab8c2a917a176a6a.png
I, [2020-09-28T17:13:20.559877 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /powered_by_stripe-4e22e57b6a4aecb2292a6175a2941ae0.png
I, [2020-09-28T17:13:20.562702 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /social/dailymotion-629944e3d8ada0c3dca217137bea1204.png
I, [2020-09-28T17:13:20.566416 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /social/echosciences-40437d99a7c69f0aba98e56b6109a80b.png
I, [2020-09-28T17:13:20.569401 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /visa-c63d23b4f77f4d9256788daea68328fb.png
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery-ui/ui/jquery.ui.core'
  (in /usr/src/app/app/assets/javascripts/application.js.erb:17)
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:106:in `resolve                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:146:in `require                                                                                                                                                             _asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:217                                                                                                                                                             :in `process_require_directive'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:167                                                                                                                                                             :in `block in process_directives'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:165                                                                                                                                                             :in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:165                                                                                                                                                             :in `process_directives'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:99:                                                                                                                                                             in `evaluate'
/usr/local/bundle/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:197:in `block i                                                                                                                                                             n evaluate'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:194:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:194:in `evaluat                                                                                                                                                             e'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/processed_asset.rb:12:in `                                                                                                                                                             initialize'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:374:in `new'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:374:in `block in b                                                                                                                                                             uild_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:395:in `circular_c                                                                                                                                                             all_protection'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:373:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:94:in `block in b                                                                                                                                                             uild_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/caching.rb:58:in `cache_as                                                                                                                                                             set'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:93:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:287:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:61:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/bundled_asset.rb:16:in `in                                                                                                                                                             itialize'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:377:in `new'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:377:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:94:in `block in b                                                                                                                                                             uild_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/caching.rb:58:in `cache_as                                                                                                                                                             set'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:93:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:287:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:61:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:211:in `block                                                                                                                                                              in find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:257:in `benchm                                                                                                                                                             ark'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:210:in `find_a                                                                                                                                                             sset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:119:in `block                                                                                                                                                              in compile'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:118:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:118:in `compil                                                                                                                                                             e'
/usr/local/bundle/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `                                                                                                                                                             block (3 levels) in define'
/usr/local/bundle/gems/sprockets-2.12.5/lib/rake/sprocketstask.rb:146:in `with_l                                                                                                                                                             ogger'
/usr/local/bundle/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `                                                                                                                                                             block (2 levels) in define'
/usr/local/bundle/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
root@FABLABTESTE:/apps/fabmanager#  docker-compose down
Stopping fabmanager_nginx_1         ... done
Stopping fabmanager_redis_1         ... done
Stopping fabmanager_elasticsearch_1 ... done
Stopping fabmanager_postgres_1      ... done
Removing fabmanager_nginx_1         ... done
Removing fabmanager_fabmanager_1    ... done
Removing fabmanager_redis_1         ... done
Removing fabmanager_elasticsearch_1 ... done
Removing fabmanager_postgres_1      ... done
Removing network fabmanager_default
root@FABLABTESTE:/apps/fabmanager# docker-compose up -d
Creating network "fabmanager_default" with the default driver
Creating fabmanager_postgres_1      ... done
Creating fabmanager_elasticsearch_1 ... done
Creating fabmanager_redis_1         ... done
Creating fabmanager_fabmanager_1    ... done
Creating fabmanager_nginx_1         ... done

and got the the system down.

I saw that this version(2.7.0) hasn´t a TODO DEPLOY CMD to do. What could it be too?

With old versions of fab-manager (< 4.3.3) you should use bundle exec rake instead of bunidle exec rails in the commands. I’ll add a notice about this in the docs.

I’ve made an upgrade from a 2.6.4 installation yesterday and I had to made it in 4 steps : 2.8.3, then 3.1.2, then 4.0.4 then the last version.
What I recommand is to change the version number in the docker-compose.yml, then docker-compose pull, then apply all « todo deploy » commands, one by one, and check if they run fine. If they don’t: stop the process and report here the error. You must run all commands, for all intermediate version, in the right order. Once done, repeat the operations for the next step version.

To answer you last question, not all versions requires to run specific upgrade commands (‹ todo deploy ›). If so, just pull, recompile the assets, and restart.

nice! thanks @Sylvain!,

opening the log app-stdout.log:

  tail -f app-stdout.log
      CACHE (0.0ms)  SELECT  "assets".* FROM "assets" WHERE "assets"."type" IN ('CustomAssetFile') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1  [["viewable_id", 2], ["viewable_type", "CustomAsset"]]
      CACHE (0.1ms)  SELECT  "custom_assets".* FROM "custom_assets" WHERE "custom_assets"."name" = $1 LIMIT 1  [["name", "favicon-file"]]
      CACHE (0.0ms)  SELECT  "assets".* FROM "assets" WHERE "assets"."type" IN ('CustomAssetFile') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1  [["viewable_id", 2], ["viewable_type", "CustomAsset"]]
      Rendered application/index.html.erb (225.5ms)
    Completed 500 Internal Server Error in 275ms (ActiveRecord: 39.2ms | Elasticsearch: 0.0ms)

LoadError (moment/locale/pt.js does not exists):
  app/views/application/index.html.erb:126:in `_app_views_application_index_html_erb___2397244793555728056_46937819273160'


Started GET "/" for 172.18.0.6 at 2020-10-01 14:14:49 +0000
Processing by ApplicationController#index as HTML
  Setting Load (1.1ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = $1 LIMIT 1  [["name", "fablab_name"]]
  Stylesheet Load (0.7ms)  SELECT  "stylesheets".* FROM "stylesheets"  ORDER BY "stylesheets"."id" ASC LIMIT 1
  CACHE (0.0ms)  SELECT  "stylesheets".* FROM "stylesheets"  ORDER BY "stylesheets"."id" ASC LIMIT 1
  CACHE (0.0ms)  SELECT  "stylesheets".* FROM "stylesheets"  ORDER BY "stylesheets"."id" ASC LIMIT 1
  CustomAsset Load (0.5ms)  SELECT  "custom_assets".* FROM "custom_assets" WHERE "custom_assets"."name" = $1 LIMIT 1  [["name", "favicon-file"]]
  CustomAssetFile Load (0.5ms)  SELECT  "assets".* FROM "assets" WHERE "assets"."type" IN ('CustomAssetFile') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1  [["viewable_id", 2], ["viewable_type", "CustomAsset"]]
  CACHE (0.0ms)  SELECT  "custom_assets".* FROM "custom_assets" WHERE "custom_assets"."name" = $1 LIMIT 1  [["name", "favicon-file"]]
  CACHE (0.0ms)  SELECT  "assets".* FROM "assets" WHERE "assets"."type" IN ('CustomAssetFile') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1  [["viewable_id", 2], ["viewable_type", "CustomAsset"]]
  CACHE (0.0ms)  SELECT  "custom_assets".* FROM "custom_assets" WHERE "custom_assets"."name" = $1 LIMIT 1  [["name", "favicon-file"]]
  CACHE (0.0ms)  SELECT  "assets".* FROM "assets" WHERE "assets"."type" IN ('CustomAssetFile') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1  [["viewable_id", 2], ["viewable_type", "CustomAsset"]]
  User Load (3.4ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 66]]
  Role Load (1.5ms)  SELECT  "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1  ORDER BY "roles"."id" ASC LIMIT 1  [["user_id", 66]]
  Profile Load (2.2ms)  SELECT  "profiles".* FROM "profiles" WHERE "profiles"."user_id" = $1 LIMIT 1  [["user_id", 66]]
  UserAvatar Load (4.8ms)  SELECT  "assets".* FROM "assets" WHERE "assets"."type" IN ('UserAvatar') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1  [["viewable_id", 61], ["viewable_type", "Profile"]]
  Address Load (1.2ms)  SELECT  "addresses".* FROM "addresses" WHERE "addresses"."placeable_id" = $1 AND "addresses"."placeable_type" = $2 LIMIT 1  [["placeable_id", 61], ["placeable_type", "Profile"]]
  Organization Load (0.8ms)  SELECT  "organizations".* FROM "organizations" WHERE "organizations"."profile_id" = $1 LIMIT 1  [["profile_id", 61]]
  Subscription Load (0.8ms)  SELECT  "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."user_id" = $1  ORDER BY "subscriptions"."id" DESC LIMIT 1  [["user_id", 66]]
  CACHE (0.0ms)  SELECT  "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."user_id" = $1  ORDER BY "subscriptions"."id" DESC LIMIT 1  [["user_id", 66]]
  Credit Load (1.4ms)  SELECT "credits".* FROM "credits" INNER JOIN "users_credits" ON "credits"."id" = "users_credits"."credit_id" WHERE "users_credits"."user_id" = $1 AND (credits.creditable_type = 'Training')  [["user_id", 66]]
  Credit Load (0.4ms)  SELECT "credits".* FROM "credits" INNER JOIN "users_credits" ON "credits"."id" = "users_credits"."credit_id" WHERE "users_credits"."user_id" = $1 AND (credits.creditable_type = 'Machine')  [["user_id", 66]]
  Rendered api/members/_member.json.jbuilder (188.7ms)
  Rendered application/index.html.erb (273.5ms)
Completed 500 Internal Server Error in 276ms (ActiveRecord: 44.8ms | Elasticsearch: 0.0ms)

LoadError (moment/locale/pt.js does not exists):
  app/views/application/index.html.erb:126:in `_app_views_application_index_html_erb___2397244793555728056_46937819273160'

Why the error exist?

LoadError (moment/locale/pt.js does not exists):

when I tried to make the upgrade, running the cmd « docker-compose run --rm fabmanager bundle exec rake assets:precompile » I got this:

root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exec rake assets:precompile
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_redis_1         ... done
  AuthProvider Load (0.7ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (0.7ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (0.5ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (1.1ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery-ui/ui/jquery.ui.core'
  (in /usr/src/app/app/assets/javascripts/application.js.erb:17)
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:106:in `resolve'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:146:in `require_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:217:in `process_require_directive'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:167:in `block in process_directives'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:165:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:165:in `process_directives'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:99:in `evaluate'
/usr/local/bundle/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:197:in `block in evaluate'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:194:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:194:in `evaluate'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/processed_asset.rb:12:in `initialize'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:374:in `new'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:374:in `block in build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:395:in `circular_call_protection'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:373:in `build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:94:in `block in build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/caching.rb:58:in `cache_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:93:in `build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:287:in `find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:61:in `find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/bundled_asset.rb:16:in `initialize'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:377:in `new'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:377:in `build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:94:in `block in build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/caching.rb:58:in `cache_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:93:in `build_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:287:in `find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:61:in `find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:211:in `block in find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:257:in `benchmark'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:210:in `find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:119:in `block in compile'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:118:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:118:in `compile'
/usr/local/bundle/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/usr/local/bundle/gems/sprockets-2.12.5/lib/rake/sprocketstask.rb:146:in `with_logger'
/usr/local/bundle/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
/usr/local/bundle/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

With the version 2.6.7, the translation was fine, now it did not find anymore, may the cmd « rm -Rf public/assets/ » have excluded and when try to recompile the assets it doesn´t find anymore?

I know that it would not make sense, but I am a kind of lost in the procedure.

I’m really sorry but I can’t understand what is the problem here… :confused:

« rm … assets/ » should only have removed files that can be generated from the sources (using assets:precompile indeed). I can’t see any reasonable reason why moment/locale/pt.js does not exist… furthermore, there’s no reason at all that jquery-ui/ui/jquery.ui.core does not exists… It looks like if there’s a problem with your docker image that would be broken, or something like that…

I you want, I can investigate on your installation through ssh but we’ll charge you for this, depending on the number of hours spent… Just let me know if you’re interested.

Otherwise, maybe you can try from scratch with a new fresh and up-to-date installation then import a copy of your old postgres folder and run the migrations and deploy commands. This may work if you’re lucky :slight_smile:

Hi @Sergio,
I just had an idea! :slight_smile:
Can you check your docker-compose.yml file? The public volume may not be mounted for the nginx service…

  nginx:
    image: nginx:1.9
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ${PWD}/config/nginx:/etc/nginx/conf.d
      - ${PWD}/letsencrypt/etc:/etc/letsencrypt
      - ${PWD}/log:/var/log/nginx
    volumes_from:        # <== check this line exists #
      - fabmanager:ro        # <== check this line exists and match the name of your FM service #
    links:
      - fabmanager:fabmanager
    restart: always

Hi @Sylvain, sorry about delay on the answer!

I you want, I can investigate on your installation through ssh but we’ll charge you for this, depending on the number of hours spent… Just let me know if you’re interested.

Nice!!! Sure, I am interested!! I just want to try by myself to learn! but sometimes We get into our limit, then we really need help!

thanks @Sylvain!

I just had an idea! :slight_smile:
Can you check your docker-compose.yml file? The public volume may not be mounted for the nginx service…

About your suggestion, it really was not! I will reinstall the backup image and try again!

I will keep you updated!

@Sylvain, good news! I did the upgrade to :release-v2.8.3 and :release-v3.1.2 with your advice!

But when I was trying to do the « to do deploy » the cmd: « docker-compose exec fabmanager bundle exec rake db:migrate --trace », it had it aborted by a missing record line on database id=70, so the migration could not happen.

  User Load (1.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 70]]
   (0.8ms)  ROLLBACK
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Couldn't find User with 'id'=70
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/core.rb:155:in `find'
/usr/src/app/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb:15:in `block in up'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/relation/delegation.rb:46:in `each'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/relation/delegation.rb:46:in `each'
/usr/src/app/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb:14:in `up'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:611:in `exec_migration'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/usr/local/lib/ruby/2.3.0/benchmark.rb:293:in `measure'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:591:in `block in migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:590:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:768:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1023:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1069:in `block in ddl_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:220:in `transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1069:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1022:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:984:in `block in migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:980:in `each'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:980:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:823:in `up'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:801:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/tasks/database_tasks.rb:139:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/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_chain'
/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 levels) 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_threads'
/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_exception_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:in `run'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/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_friendly_errors'
/usr/local/bin/bundle:22:in `<main>'

Caused by:
ActiveRecord::RecordNotFound: Couldn't find User with 'id'=70
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/core.rb:155:in `find'
/usr/src/app/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb:15:in `block in up'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/relation/delegation.rb:46:in `each'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/relation/delegation.rb:46:in `each'
/usr/src/app/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb:14:in `up'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:611:in `exec_migration'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/usr/local/lib/ruby/2.3.0/benchmark.rb:293:in `measure'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:591:in `block in migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:590:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:768:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1023:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1069:in `block in ddl_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/transactions.rb:220:in `transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1069:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:1022:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:984:in `block in migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:980:in `each'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:980:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:823:in `up'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/migration.rb:801:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/tasks/database_tasks.rb:139:in `migrate'
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/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_chain'
/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 levels) 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_threads'
/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_exception_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:in `run'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/site_ruby/2.3.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/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_friendly_errors'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate

There is a way to insert this record manualy to complete the db:migrate process?

OBS: I noticed the problem when I Upgraded to 4.0.4 version

Well… this does not make sense to me because the app did not provide any way to delete a user before v4.0.0.
Have you manually deleted the user from the database? If this is the case, you must effectivly recreate it from the command line. I’m not 100% sure, but the following may work:

docker-compose exec fabmanager bundle exec rails c
user = User.new(id: 70, username: 'xxx', email: 'xxx@mail.com', password: 'xxxxxxxx', password_confirmation: 'xxxxxxxx', group_id: Group.first.id, profile_attributes: { first_name: 'xxxxx', last_name: 'xxxxx', phone: '0000000000' }, statistic_profile_attributes: { gender: true, birthday: DateTime.current })
user.add_role 'member'
user.save!

Hi @Sylvain!! good news!! We did it with your help!! now we are on the lastest version!!

thank you!!

Now Before put it in production, We would like to adopt a backup procedure, What would you recommend to backup routine?

What would be the best procedure or just backing the virtual Machine up is enough?

@Sylvain, another question, I deleted a admin user, but this user had some publications projects on fabmanager .

can I rollback it and recover the publication??

Great!

The backup procedure is easy: just copy the /apps/fabmanager folder to a safe place. I do not recommand compressing it on the same machine as Fab-manager, unless the machine is very powerfull, because it may cause Fab-manager to slow down and become unusable…

Concerning your other question, unless you had a data backup, there’s no way at all to retreive a deleted user, sorry…

Great @Sylvain!!

nice, it is easy so!

We will make all procedures to put everything in production with a backup scheaduler, and when everthing be all right I will keep you update!

thanks one more time @Sylvain!!

1 « J'aime »

@Sylvain,

When I was making the upgrade, everthing was fine on 3.1.2 until reach the step TODO DEPLOY:

And I got the message:

`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`

Now I am doing the upgrade on our production VM, what could it be?

This seems to indicate that you have missed a

docker-compose exec fabmanager bundle exec rake db:migrate

Hi @Sylvain,

I did not give you a feed back about the process.

Everything is fine now! We had a internal issue that was not able to resolve the name of the server, now everything is fine, We made the Upgrade very well now!!

Thanks for all your support, and you do a fantastic job with fabmanager system!

Thanks for all!

Best Regards!

1 « J'aime »