db/seeds.rb creates admin with password too short for Devise validation #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
db/seeds.rbcreates the initial admin user with password'admin'(5 characters), but Devise requires a minimum password length of 8 characters. As a result, seeding fails silently — the error is caught and printed, but no admin account is created.Steps to reproduce
Output:
Expected behavior
Seeding should create a working admin account.
Fix
Change the default seed password to meet Devise's minimum length requirement (8 characters), e.g.
'admin123', or better yet use a randomly generated password and print it to stdout so the user knows what to use.