简体   繁体   中英

Rails app takes a long time to generate error page

My Rails app generates error page very slowly (Rail 3.1/3.2, ruby 1.9.2/1.9.3). Eg I have added my_bad_variable to some .haml template and

Rendered fees/index.html.haml within layouts/application (97752.1ms) Completed 500 Internal Server Error in 99579ms

ActionView::Template::Error (undefined local variable or method `my_bad_variable' for #<#:0x00000003bbf0c8>):

After deleting this fake variable:

Completed 200 OK in 327ms (Views: 274.7ms | ActiveRecord: 9.8ms)

Any suggestions?

I had this issue when I upgraded to rails 3.2. I added this initializer to fix it:

module ActionDispatch
  module Routing
    class RouteSet
      alias :inspect :to_s
    end
  end
end

I think it was related to ree. Are you using ree?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM