I get this error if I start the web server (in my Thin case) before the database is available (in my case MySQL is not working, for example).
I download the application in my browser and it complains that MySQL is not working, so I start MySQL, I will return to the application that is loading correctly now, but will not allow me to log in (I get the error described by OP).
If I now start and restart the web server and try again, I can log in without errors.
Presumably valid_password? is a method that is added to the model at boot time and depends on the available database.
source share