I only get this error in Development Environtment after editing some code (any code) and press Refresh to see the changes.
Everytime this happens it raises an error says "Stack Level Too Deep" then when I refresh the page it agains raise "Routing Error". Then I cannot browse any page until I restart the server.
I will have to stop Rails server then start it again, then it works until I make changes to the code again.
I tried several methods including increase ulimit "ulimit -s" command, but it didn't solve the problem. I searched that this is related to infinite loops but in my case it has nothing to do with the code because the error disappears after I restart the server.
Any clues or solutions would be highly appreciated. Thanks.
Edited: add routes.rb and stack trace
Routes: http://pastebin.com/YzXyUH35
Stack Trace:
SystemStackError (stack level too deep):
actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:70
Rendered /Users/duy/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms)
Rendered /Users/duy/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.3ms)
Rendered /Users/duy/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (19.9ms)