Actions
Bug #14542
openforeman-rake db:setup fails in db:seed task
Status:
New
Priority:
Normal
Assignee:
-
Category:
DB migrations
Target version:
-
Description
Howto reproduce:
- start from scratch, install the foreman package with any database support (sqlite will do)
- as root, call
foreman-rake db:setup
: the program fails during the db:seed task, specifically in the04-admin.rb
part (the backtrace stipulates that itcan't call dup in NilClass at 04-admin.rb:38
)
Cause:
- this is partly related to #14541 because none of ENV['SEED_ADMIN_EMAIL'] nor Setting[:administrator] seem to be valid
As a sidenote, calling foreman-rake db:seed
works.
Updated by Dominic Cleal over 8 years ago
- Category set to DB migrations
Setting[:administrator]
won't have been initialised yet, as there's been no application startup since the DB migration and before the DB seed. Running migration/creation and seeding in two separate commands works as the setting's populated when the seed starts up.
In the long term, settings should probably be moved into the seed scripts.
Actions