I have a rails app that is using Devise perfectly in development. I have altered it, following the official Devise documentation to use a username instead of an email address. I am also using MySQL, instead of SQLite.
When logging in, in development, I can type in “admin” to login as the user “Admin”. But in production, “admin” does not work and requires me to type in the case sensitive “Admin”.
I’m assuming it’s a different setting in my MySQL database?
I’m assuming here that you have an attribute for logging in called
login. If it’susername, use that instead ofloginbelow. In your Devise initializer, there is a setting:Change to
This will:
So, you might need to update the Admin’s login once, but then if you type in Admin or admin, it will find and authenticate.