1
剛安裝了Ruby通過RVM和Passender:創業板安裝乘客& & rvmsudo乘客安裝,nginx的模塊客運+ Nginx的+西納特拉:友好的錯誤頁不出現
簡單的末日應用程序正常工作:
app.rb:
require 'sinatra'
get '/' do
"Hello World!"
end
config.ru:
require 'sinatra'
require './app.rb'
run Sinatra::Application
但是,當我在代碼中添加錯誤,例如:
require 'sinatra'
get '/' do
aaa # error here
"Hello World!"
end
我exect看到紫色友好的錯誤頁面,但我看到的只是:內部服務器錯誤如果在nginx.conf中生成passenger_app_env或者標準爲發生錯誤如果生成了nginx錯誤頁面passenger_app_env開發。 在這兩種情況下error.log中有錯誤消息