Content
You are here:
Fail on running db:seed.
Added by Lek Yo almost 5 years ago
Happy New Year!
I'm going to learn how to develop a OpenProject plugin.
I followed this tutorial to setup development environtment, when I try to run ./bin/rake db:migrate db:seed db:test:prepare
, it show me this error:
default: D, [2019-12-31T10:16:21.538846 #4285] DEBUG -- : ↳ app/models/journal/aggregated_journal.rb:392:in `successor'
default: D, [2019-12-31T10:16:21.562952 #4285] DEBUG -- : (0.5ms) SELECT "webhooks_webhooks"."id" FROM "webhooks_webhooks" INNER JOIN "webhooks_events" ON "webhooks_events"."webhooks_webhook_id" = "webhooks_webhooks"."id" WHERE "webhooks_webhooks"."enabled" = $1 AND "webhooks_webhooks"."enabled" = $2 AND "webhooks_events"."name" = $3 ORDER BY "webhooks_webhooks"."id" ASC [["enabled", true], ["enabled", true], ["name", "work_package:created"]]
default: D, [2019-12-31T10:16:21.563424 #4285] DEBUG -- : ↳ modules/webhooks/lib/open_project/webhooks/event_resources/work_package.rb:26:in `handle_notification'
default: D, [2019-12-31T10:16:21.564428 #4285] DEBUG -- : (0.3ms) ROLLBACK
default: D, [2019-12-31T10:16:21.564648 #4285] DEBUG -- : ↳ app/seeders/root_seeder.rb:57:in `do_seed!'
default: rake aborted!
default: ArgumentError: A copy of DemoData::References has been removed from the module tree but is still active!
default: /home/vagrant/openproject/app/seeders/demo_data/references.rb:124:in `link_sprints'
default: /home/vagrant/openproject/app/seeders/demo_data/references.rb:44:in `with_references'
default: /home/vagrant/openproject/app/seeders/demo_data/work_package_seeder.rb:88:in `create_work_package'
default: /home/vagrant/openproject/app/seeders/demo_data/work_package_seeder.rb:69:in `create_or_update_work_package'
default: /home/vagrant/openproject/app/seeders/demo_data/work_package_seeder.rb:61:in `block in seed_demo_work_packages'
default: /home/vagrant/openproject/app/seeders/demo_data/work_package_seeder.rb:59:in `each'
default: /home/vagrant/openproject/app/seeders/demo_data/work_package_seeder.rb:59:in `seed_demo_work_packages'
default: /home/vagrant/openproject/app/seeders/demo_data/work_package_seeder.rb:48:in `seed_data!'
default: /home/vagrant/openproject/app/seeders/seeder.rb:33:in `seed!'
default: /home/vagrant/openproject/app/seeders/demo_data/project_seeder.rb:66:in `block (2 levels) in seed_data!'
default: /home/vagrant/openproject/app/seeders/demo_data/project_seeder.rb:64:in `each'
default: /home/vagrant/openproject/app/seeders/demo_data/project_seeder.rb:64:in `block in seed_data!'
default: /home/vagrant/openproject/app/seeders/demo_data/project_seeder.rb:37:in `each'
default: /home/vagrant/openproject/app/seeders/demo_data/project_seeder.rb:37:in `seed_data!'
default: /home/vagrant/openproject/app/seeders/seeder.rb:33:in `seed!'
default: /home/vagrant/openproject/app/seeders/composite_seeder.rb:33:in `block (2 levels) in seed_data!'
default: /home/vagrant/openproject/app/seeders/composite_seeder.rb:31:in `each'
default: /home/vagrant/openproject/app/seeders/composite_seeder.rb:31:in `block in seed_data!'
default: /home/vagrant/openproject/app/seeders/composite_seeder.rb:30:in `seed_data!'
default: /home/vagrant/openproject/app/seeders/seeder.rb:33:in `seed!'
default: /home/vagrant/openproject/app/seeders/root_seeder.rb:65:in `block in do_seed!'
default: /home/vagrant/openproject/app/seeders/root_seeder.rb:57:in `do_seed!'
default: /home/vagrant/openproject/app/seeders/root_seeder.rb:53:in `seed_data!'
default: /home/vagrant/openproject/app/seeders/seeder.rb:33:in `seed!'
default: /home/vagrant/openproject/db/seeds.rb:30:in `<main>'
default: -e:1:in `<main>'
default: Tasks: TOP => db:seed
default: (See full trace by running task with --trace)
My development environment is CentOS7 + PostgreSQL10 in Vagrant. I uploaded my Vagrantfile as attachment. Please help.
Replies (3)
Hello, I get this error too. Debian10 + postgresql 12.1 + ruby 2.6.5 + rails 6.0.1 + bundler 2.1.4 + npm 6.13.4. Please, help me! :)
Finally I solved this issue by switch from Vagrant to my host, ArchLinux + SQLite.
Глеб Золотов wrote:
This is an error in Rails that prevents
db:migrate
anddb:seed
in the same command. Please run them separately. We don't exactly know where this comes from, but here's a report upstream: https://github.com/rails/rails/issues/29112Best
Oliver