我正在尝试在DigitalOcean服务器上的rails应用程序上部署我的ruby。我正在使用Ubuntu 14.04 x64,Passenger 5.0.10和Apache 2进行部署。我按照this教程。当我尝试在生产环境中运行我的应用程序时,我收到此错误“我们很抱歉,但出现了问题。我们已经收到有关此问题的通知,我们很快就会对其进行审核。”我可以在开发环境上运行。
这是Apache 2 access.log:
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 403 494 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 403 505 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 3339 "http://kproxy.com/doproxy.jsp" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.8$
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 3339 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 64889 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.$
"GET / HTTP/1.1" 500 66303 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"
"GET /favicon.ico HTTP/1.1" 200 295 "http://45.55.92.193/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.
这是Apache 2 error.log:
/usr/local/lib/ruby/gems/2.2.0/gems/devise-3.5.1/lib/devise/rails.rb:14:in `block in <class:Engine>'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:36:in `call'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application/finisher.rb:55:in `block in <module:Finisher>'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/usr/local/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/local/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/local/lib/ruby/2.2.0/tsort.rb:345:in `each'
/usr/local/lib/ruby/2.2.0/tsort.rb:345:in `call'
/usr/local/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/local/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/usr/local/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/home/rails/App/newdvp/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.1/lib/rack/builder.rb:55:in `instance_eval'
/usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.1/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.10/helper-scripts/rack-preloader.rb:107:in `eval'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.10/helper-scripts/rack-preloader.rb:107:in `preload_app'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.10/helper-scripts/rack-preloader.rb:153:in `<module:App>'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.10/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.10/helper-scripts/rack-preloader.rb:28:in `<main>'
[ 2015-06-16 02:34:33.2422 9276/7f74f0b2e700
age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-5]
Cannot checkout session because a spawning error occurred.
The identifier of the error is 74aaa4d4. Please see ear$
我的database.yml:
development:
adapter: postgresql
encoding: unicode
database: dvp_development
pool: 5
username: rails
password:
host: localhost
test:
adapter: postgresql
encoding: unicode
database: dvp_development
pool: 5
username:
password:
production:
adapter: postgresql
encoding: unicode
database: dvp_development
pool: 5
username: rails
password:
host: localhost
答案 0 :(得分:0)
您可以将以下选项添加到您的apache虚拟主机:
PassengerFriendlyErrorPages on
它允许apache / passenger显示友好的错误页面。希望它会有所帮助。