AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
839 stars 315 forks source link

[7.0] Alchemy::Seeder.seed! not working - uninitialized constant Alchemy::Seeder #2569

Closed vBalatroni closed 9 months ago

vBalatroni commented 1 year ago

Steps to reproduce

Run a clean installation

Expected behavior

seeds.rb should populate database

Actual behavior

While performing a clean installation i noticed that when the seeds.rb were launched nothing happened. I checked on my database and actually there were no datas preloaded. i Tried to go to rails c and run manually the command Alchemy::Seeder.seed! but up to my surprise it returned me this error.

Screenshot 2023-08-23 alle 12 29 30

Due to this problem whenever i try to go to root page i get this error.

Screenshot 2023-08-23 alle 12 32 57

If you need more information let me know

System configuration

tvdeyen commented 1 year ago

Can you show us your db/seeds/alchemy/pages.yml file?

tvdeyen commented 9 months ago

Ah, just saw that you used the rails console. Have your tried to require the seeder first?

require "alchemy/seeder"

But unless you have a db/seeds/alchemy/pages.yml or db/seeds/alchemy/users.yml there will not be seeded anything. Alchemy does not need seeds to work, it will onboard you with necessary models (sites and languages) during first install.