如何讓rails在production mode下直接在網頁顯示錯誤訊息?(像development mode那樣)
# 修改 config/environments/production.rb # 找到config.consider_all_requests_local
config.consider_all_requests_local = true # 預設是false
重開web server,就完成啦!
How to showing error message on web just time in production mode, like in development mode?
in config/environments/production.rb
# find “config.consider_all_requests_local” config.consider_all_requests_local = true # default is false
restart web server, and you’re done
喜歡這篇文章嗎?你可能也會喜歡我的學習電子報,我會分享經過篩選的優質內容 + 學習心得
📚 訂閱我的學習電子報
📖 涵蓋主題:
🧑💻 軟體工程
🎯 生產力
💰 商業理財
🧳 創業
🐱 奇怪的知識增加了
💭 思考人生心得
🎁 現在訂閱就送我個人非常愛用「學習任何領域皮毛的 AI Prompt」!
立即免費訂閱 →
✨ 不浪費你的時間,只分享達到我標準的優質內容