简体   繁体   English

Rails堆栈级别太深

[英]Rails Stack Level too deep

How can I get more information from an error like this? 如何从这样的错误中获取更多信息?

=> Booting WEBrick
=> Rails 3.1.1 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
script/rails:6: stack level too deep (SystemStackError)

The error was only occurring in production. 该错误仅在生产中发生。

When changing settings inside config/environments/production.rb , I found that setting config.cache_classes = false let me boot the app in production. 更改config/environments/production.rb中的设置时,我发现设置config.cache_classes = false让我在生产环境中启动应用程序。 Upon reviewing the commit I found the offending class. 在审查提交后,我发现了令人反感的类。

I had created a model called Object which seemed to have interfered with the way caching works, likely overwriting a core ruby Object class. 我创建了一个名为Object的模型,该模型似乎干扰了缓存的工作方式,可能会覆盖核心的ruby Object类。

It's a loop. 这是一个循环。 To have more details of this, you et "config.log_level = :debug" in the config/environments/production.rb and restart your server 要获得更多详细信息,请在config / environments / production.rb中使用"config.log_level = :debug"并重新启动服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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