简体   繁体   中英

Rails strange Stack Level Too Deep & Routing Error

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)

请将您的会话存储更改为活动记录存储或config.cache_store = :dalli_storedalli gem),而不是cookie存储。

There was a bug in devise_inviable gem that caused the problem I got. I found the answer here helps solve my problem rails 3 routes stack level too deep devise

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