开发者

Getting error of undefined method 'valid_password?' with Authlogic

I get suddenly the below error on my server with Authlogic

NoMethodError (undefined method `valid_password?' for #<ProductionHouse:0xb53859cc>):

authlogic (2.1.3) [v] lib/authlogic/session/password.rb:191:in `send'

authlogic (2.1.3) [v] lib/authlogic/session/password.rb:191:in `validate_by_password'

authlogic (2.1.3) [v] lib/authlogic/session/callbacks.rb:7开发者_如何转开发2:in `validate'

authlogic (2.1.3) [v] lib/authlogic/session/validation.rb:64:in `valid?'

authlogic (2.1.3) [v] lib/authlogic/session/existence.rb:65:in `save'

app/controllers/user_session_controller.rb:162:in `create'

pdfkit (0.5.1) lib/pdfkit/middleware.rb:16:in `call'

Cant get the issue sudden happen? Is there any one knows regarding this then please help?


I get this error if I start the web server (in my case Thin) before the database is available (in my case MySQL is not running for example).

I load up the app in my browser and it complains that MySQL is not running, so I start MySQL, return to the app which now loads correctly, but will not let me log in (I get the error described by the OP).

If I now go and restart the web server, and try again, I can log in without error.

Presumably valid_password? is a method that is added to the model at boot time, and is dependent on the database being available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜