gpt4 book ai didi

ruby-on-rails - "stack level too deep error"每次更改 routes.rb

转载 作者:行者123 更新时间:2023-12-01 05:25:46 24 4
gpt4 key购买 nike

这个问题不太可能对任何 future 的访客有帮助;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况相关,通常不适用于互联网的全局受众。如需帮助使这个问题更广泛适用,visit the help center .




8年前关闭。




每次我更改 routes.rb 时,我都会在任何第一个请求中收到“堆栈级别太深错误”,然后我收到“路由错误”,直到我重新启动我的开发服务器。重新启动后,一切都像魅力一样。

跟踪说明如下:

SystemStackError (stack level too deep):
actionpack (3.2.9) lib/action_dispatch/middleware/reloader.rb:70

Rendered /Users/timo/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
Rendered /Users/timo/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
Rendered /Users/timo/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (15.6ms)

不幸的是,当这个问题开始发生时,我无法回溯,之后更新或代码更改左右。我所知道的是,它最近开始发生,它发生在 rails 3.2.8 和 mri 1.9.3-p125 上,我更新到 rails 3.2.9 和 mri 1.9.3-p327 没有效果。

这实际上很烦人(因为它在重新启动后工作)但仍然感谢帮助!

最佳答案

引自 OP 帖子的早期版本:

I was able to find the culprit: DEVISE! When I comment the following lines everything works fine.

devise_for :listeners, :controllers => {:registrations => "listeners/registrations", :invitations => "listeners/invitations"}, :path_names => {:sign_in => 'login', :sign_out => 'logout'}
devise_scope :listener do
get "login", :to => "devise/sessions#new"
end

Now I also know that this issue is a duplicate with: rails 3 routes stack level too deep devise

关于ruby-on-rails - "stack level too deep error"每次更改 routes.rb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13933294/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com