在运行rails服务器时,我会在开发过程中遇到代码中的临时错误后偶尔出现此错误。
[INFO] Started GET "/dashboard" for 127.0.0.1
[FATAL]
RuntimeError (User does not respond to 'devise' method. This usually means you haven't loaded your ORM file or it's being loaded too late. To fix it, be sure to require 'devise/orm/YOUR_ORM' inside 'config/initializers/devise.rb' or before your application definition in 'config/application.rb'):
config/routes.rb:6:in `block in <top (required)>'
config/routes.rb:1:in `<top (required)>'
config/initializers/logger_config.rb:27:in `call_with_quiet_assets'
之后,服务器将变得无用并丢失所有路由。
[INFO] Started GET "/dashboard" for 127.0.0.1
[FATAL]
ActionController::RoutingError (No route matches [GET] "/cancel"):
config/initializers/logger_config.rb:27:in `call_with_quiet_assets'
有人对此有解决方法吗?对于开发人员来说,每次发生这种情况时都会重新启动服务器并且其他解决方案要解决设备的初始化问题,这非常令人沮丧。
每当我编辑某些似乎被缓存的ajax提取时,这仍然困扰着我。