Bonjour,
J’avais fait mon find idiotement.
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:22:44 > [bashpid_8923 33] [main]
find . -iname database.yml.sample
./docker/dev/database.yml.sample
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:22:46 > [bashpid_8923 34] [main]
cp docker/dev/database.yml.sample config/database.yml
Là, ça va tout de suite mieux, j’ai pu poursuivre. Il faut juste penser à aussi modifier le hostname dans le config/database.yml.
Ensuite, ça a bien été jusqu’au rake; ce dernier s’est achevé avec des messages à la fin:
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:48:27 > [bashpid_8923 43] [main]
bin/rake db:create db:migrate
Created database 'eky_docker_development'
Created database 'ekylibre_test'
== 20121212122000 CreateBase: migrating =======================================
-- create_table(:account_balances, {})
-> 0.0688s
-- create_table(:accounts, {})
-> 0.0466s
-- create_table(:activities, {})
-> 0.0680s
---8<---
...
== 20211220140042 AddColumnsToActivityBudgetItem: migrating ===================
-- add_column(:activity_budget_items, :use_transfer_price, :boolean, {:default=>false})
-> 0.0020s
-- add_column(:activity_budget_items, :transfer_price, :float)
-> 0.0023s
-- add_column(:activity_budget_items, :locked, :boolean, {:default=>false})
-> 0.0026s
-- add_reference(:activity_budget_items, :transfered_activity_budget, {:foreign_key=>{:to_table=>:activity_budgets}})
-> 0.0109s
== 20211220140042 AddColumnsToActivityBudgetItem: migrated (0.0182s) ==========
[WARNING] - The list of tenants to migrate appears to be empty. This could mean a few things:
1. You may not have created any, in which case you can ignore this message
2. You've run `apartment:migrate` directly without loading the Rails environment
* `apartment:migrate` is now deprecated. Tenants will automatically be migrated with `db:migrate`
Note that your tenants currently haven't been migrated. You'll need to run `db:migrate` to rectify this.
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:49:58 > [bashpid_8923 44] [main]
Je ne sais pas du tout si cette histoire de tenants devrait m’inquiéter ou pas.
Pour le rake lexicon, j’ai eu droit à un message d’erreur:
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:49:58 > [bashpid_8923 44] [main]
bin/rake lexicon:load
Loading Lexicon ...
--Drop old Lexicon if exist...
--Download lexicon 5.0.5-light...
The file .lexicon-version is missing
Error while reading the lexicon package
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:54:08 > [bashpid_8923 45] [main]
find . -iname .lexicon-version
./.lexicon-version
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:54:40 > [bashpid_8923 46] [main]
cat .lexicon-version
5.0.5-light
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__15:54:49 > [bashpid_8923 47] [main]
Curieux: ça a l’air de bien lire le contenu du fichier (--Download lexicon 5.0.5-light...
), puis ça dit “Error while reading the lexicon package
”.
Est-ce grave?
J’ai poursuivi avec les données de démonstration: pas de souci pour le git clone
, mais au moment de faire le bin/rake first_run
, il y a des erreurs avec des messages de PostgreSQL faisant état de transactions annulées:
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__16:10:18 > [bashpid_8923 50] [main]
bin/rake first_run
+ Ekylibre settings (manifest.yml) ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 4% 9sIt's not recommended to use `in` as a field value since `in?` is defined. (Entity#country)
rake aborted!
ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
: UPDATE "imports" SET "state" = 'errored', "updated_at" = '2022-03-29 14:11:36.411394', "lock_version" = 1 WHERE "imports"."id" = $1 AND "imports"."lock_version" = $2
/home/pierre/heaume_pierre/developpt/ekylibre/app/models/import.rb:148:in `run_result'
/home/pierre/heaume_pierre/developpt/ekylibre/app/models/import.rb:79:in `launch_result!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:190:in `import!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:238:in `import'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:123:in `import_file'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:69:in `block (2 levels) in run_loader'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:60:in `each'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:60:in `block in run_loader'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:56:in `run_loader'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:46:in `block (2 levels) in run'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:45:in `each'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:45:in `block in run'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:84:in `secure_transaction'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:44:in `run'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:61:in `block in launch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:78:in `block in secure_tenant'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/tenant.rb:166:in `switch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:77:in `secure_tenant'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:57:in `launch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:23:in `launch!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/tasks/first_run.rake:46:in `block in <top (required)>'
Caused by:
PG::InFailedSqlTransaction: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
/home/pierre/heaume_pierre/developpt/ekylibre/app/models/import.rb:148:in `run_result'
/home/pierre/heaume_pierre/developpt/ekylibre/app/models/import.rb:79:in `launch_result!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:190:in `import!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:238:in `import'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:123:in `import_file'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:69:in `block (2 levels) in run_loader'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:60:in `each'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:60:in `block in run_loader'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:56:in `run_loader'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:46:in `block (2 levels) in run'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:45:in `each'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:45:in `block in run'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:84:in `secure_transaction'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run/base.rb:44:in `run'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:61:in `block in launch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:78:in `block in secure_tenant'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/tenant.rb:166:in `switch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:77:in `secure_tenant'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:57:in `launch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:23:in `launch!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/tasks/first_run.rake:46:in `block in <top (required)>'
Tasks: TOP => first_run
(See full trace by running task with --trace)
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__16:11:36 > [bashpid_8923 51] [main]
Sans grande surprise, la suite n’a guère fonctionné:
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__16:19:20 > [bashpid_8923 51] [main]
bin/rake first_run tenant:init TENANT=my-farm
rake aborted!
Errno::ENOENT: Aucun fichier ou dossier de ce type @ rb_sysopen - /home/pierre/heaume_pierre/developpt/ekylibre/db/first_runs/my-farm/manifest.yml
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:47:in `launch'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/ekylibre/first_run.rb:23:in `launch!'
/home/pierre/heaume_pierre/developpt/ekylibre/lib/tasks/first_run.rake:46:in `block in <top (required)>'
Tasks: TOP => first_run
(See full trace by running task with --trace)
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__16:19:42 > [bashpid_8923 52] [main]
Il n’y a pas de répertoire my-farm, dans lequel est attendu un manifest.yml:
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__16:20:16 > [bashpid_8923 53] [main]
ls db/first_runs/
demo demo-gestion demo-innovation demo-production README.md
# pierre@latitude: ~/dev/ekylibre < 2022_03_29__16:22:08 > [bashpid_8923 54] [main]
Voilà où j’en suis.
Pas terrible, je ne suis guère fier de moi…