如何從這樣的錯誤中獲得更多信息?導軌堆棧層太深
=> 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)
如何從這樣的錯誤中獲得更多信息?導軌堆棧層太深
=> 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)
錯誤僅在生產中發生。
當更改config/environments/production.rb
中的設置時,我發現設置config.cache_classes = false
可讓我在生產中引導應用程序。在審查提交後,我發現了違規類。
我創建了一個名爲Object
的模型,它似乎干擾了緩存的工作方式,可能會覆蓋核心ruby Object
類。
這是一個循環。要獲得更多詳細信息,請在config/environments/production.rb中輸入"config.log_level = :debug"
,然後重新啓動服務器。
仍然無法從改變日誌級別中學習。它太早崩潰。 –
嘗試使用tail -f log/development.log。你還記得你對應用程序所做的最後一項改變嗎? –
只有在生產中運行。日誌並沒有太大的幫助,因爲它似乎太早崩潰了。我確實擁有版本控制功能,並且已經指出了引入錯誤的提交方式,所以我必須仔細查看它以確定引入的內容。 –