Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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). E.g. 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?

like image 682
maxs Avatar asked Jan 15 '12 20:01

maxs


1 Answers

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?

like image 145
JohnColvin Avatar answered Sep 21 '22 03:09

JohnColvin