Unicorn/nginx /rails4 通过 mina 部署 - 504 网关超时和 unicorn 日志中的错误
Unicorn/nginx /rails4 deployed via mina - 504 gateway timeout and errors in unicorn log
编辑....
我已经尝试用 Cap 和 puma 设置整个过程,而 puma 给了我同样的错误和独角兽。好像跟active_suppport有关....
任何帮助...
puma 错误日志:
pi@photo:~/rails/phototank/current$ bundle exec puma -C /home/pi/rails/phototank/shared/puma.rb
Puma starting in single mode...
* Version 2.16.0 (ruby 2.2.3-p173), codename: Midwinter Nights Trance
* Min threads: 4, max threads: 16
* Environment: production
! Unable to load application: LoadError: No such file to load -- Find
/home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': No such file to load -- Find (LoadError)
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/20160130233939/app/controllers/catalogs_controller.rb:1:in `<top (required)>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/pi/rails/phototank/current/config/environment.rb:5:in `<top (required)>'
from /home/pi/rails/phototank/current/config.ru:3:in `require'
from /home/pi/rails/phototank/current/config.ru:3:in `block in <main>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /home/pi/rails/phototank/current/config.ru:in `new'
from /home/pi/rails/phototank/current/config.ru:in `<main>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/configuration.rb:155:in `load_rackup'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/configuration.rb:99:in `app'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/runner.rb:114:in `load_and_bind'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/single.rb:79:in `run'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/cli.rb:214:in `run'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/bin/puma:10:in `<top (required)>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/bin/puma:23:in `load'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/bin/puma:23:in `<main>'
我无法获取我的生产系统 运行ning。我遵循了出色的指南:https://www.ralfebert.de/tutorials/rails-deployment/ 来获得全部内容 运行ning。我从一个简单的演示应用程序开始,然后得到了 运行ning。之后,我对我的应用程序做了同样的事情。我有整个部署 运行ning,我可以启动 unicorn 和 nginx 而不会掉下来......但是没有雪茄......我从 nginx 得到 504 网关超时和 sh**load 中的错误nginx 日志。似乎 rails 根本没有抱怨...因为它不是真的 运行ning.
我可以在我的开发机器上 运行 相同的应用程序 - 所以它不应该是我的代码。我怀疑这可能是 gems 的一些依赖性问题 - unicorn 日志中的最后信息是 'Refreshing Gem list' 在它抛出之前
这是一些日志和设置:
Nginx 日志:
[2016-01-30T13:40:13.321375 #1608] ERROR -- : reaped #<Process::Status: pid 1924 exit 1> worker=0
I, [2016-01-30T13:40:13.322633 #1608] INFO -- : worker=0 spawning...
I, [2016-01-30T13:40:13.331328 #1931] INFO -- : worker=0 spawned pid=1931
I, [2016-01-30T13:40:13.332517 #1931] INFO -- : Refreshing Gem list
/home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': No such file to load -- Find (LoadError)
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/app/controllers/catalogs_controller.rb:1:in `<top (required)>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/pi/rails/phototank/releases/3/config/environment.rb:5:in `<top (required)>'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from config.ru:4:in `block in <main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `block in builder'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `call'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `build_app!'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:617:in `init_worker_process'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:639:in `worker_loop'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:283:in `join'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/bin/unicorn:126:in `<top (required)>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `load'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
E, [2016-01-30T13:40:17.174045 #1608] ERROR -- : reaped #<Process::Status: pid 1927 exit 1> worker=1
I, [2016-01-30T13:40:17.175791 #1608] INFO -- : worker=1 spawning...
I, [2016-01-30T13:40:17.183616 #1935] INFO -- : worker=1 spawned pid=1935
I, [2016-01-30T13:40:17.184766 #1935] INFO -- : Refreshing Gem list
/home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': No such file to load -- Find (LoadError)
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/app/controllers/catalogs_controller.rb:1:in `<top (required)>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/pi/rails/phototank/releases/3/config/environment.rb:5:in `<top (required)>'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from config.ru:4:in `block in <main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `block in builder'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `call'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `build_app!'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:617:in `init_worker_process'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:639:in `worker_loop'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:283:in `join'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/bin/unicorn:126:in `<top (required)>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `load'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
E, [2016-01-30T13:40:27.338467 #1608] ERROR -- : reaped #<Process::Status: pid 1931 exit 1> worker=0
I, [2016-01-30T13:40:27.339875 #1608] INFO -- : worker=0 spawning...
I, [2016-01-30T13:40:27.347598 #1939] INFO -- : worker=0 spawned pid=1939
I, [2016-01-30T13:40:27.348777 #1939] INFO -- : Refreshing Gem list
独角兽设置:
app_path = File.expand_path(File.join(File.dirname(__FILE__), '../../'))
#app_path = '/home/pi/rails/demo/releases/4'
listen '127.0.0.1:4000'
listen File.join(app_path, 'shared/unicorn.sock'), :backlog => 64
worker_processes 2
working_directory File.join(app_path, 'current')
pid File.join(app_path, 'shared/unicorn.pid')
stderr_path File.join(app_path, 'current/log/unicorn.log')
stdout_path File.join(app_path, 'current/log/unicorn.log')
nginx 设置:
upstream phototank {
server unix:/home/pi/rails/phototank/shared/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name 192.168.2.103;
root /home/pi/rails/phototank/current/public;
index index.htm index.html;
location / {
try_files $uri/index.html $uri.html $uri @app;
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://phototank;
}
}
server {
listen 80;
server_name 192.168.2.103;
return 301 http://192.168.2.103$request_uri;
}
Nginx 日志:
2016/01/30 13:19:59 [warn] 614#0: conflicting server name "192.168.2.103" on 0.0.0.0:80, ignored
2016/01/30 13:19:59 [warn] 781#0: conflicting server name "192.168.2.103" on 0.0.0.0:80, ignored
2016/01/30 13:47:36 [error] 785#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.2.70, server: 192.168.2.103, request: "GET /catalogs HTTP/1.1", upstream: "http://unix:/home/pi/rails/phototank/shared/unicorn.sock/catalogs", host: "192.168.2.103"
虽然我还没有找到答案,但我会关闭这个问题...不过我发现这就是问题所在:
Unable to load application: LoadError: No such file to load -- Find
我有一个控制器:
require 'Find'
class CatalogsController < ApplicationController
...
当我删除 'require Find' 时一切正常。我留给我一个关于如何在控制器中要求模块(查找)的新问题???
编辑.... 我已经尝试用 Cap 和 puma 设置整个过程,而 puma 给了我同样的错误和独角兽。好像跟active_suppport有关....
任何帮助...
puma 错误日志:
pi@photo:~/rails/phototank/current$ bundle exec puma -C /home/pi/rails/phototank/shared/puma.rb
Puma starting in single mode...
* Version 2.16.0 (ruby 2.2.3-p173), codename: Midwinter Nights Trance
* Min threads: 4, max threads: 16
* Environment: production
! Unable to load application: LoadError: No such file to load -- Find
/home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': No such file to load -- Find (LoadError)
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/20160130233939/app/controllers/catalogs_controller.rb:1:in `<top (required)>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/pi/rails/phototank/current/config/environment.rb:5:in `<top (required)>'
from /home/pi/rails/phototank/current/config.ru:3:in `require'
from /home/pi/rails/phototank/current/config.ru:3:in `block in <main>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /home/pi/rails/phototank/current/config.ru:in `new'
from /home/pi/rails/phototank/current/config.ru:in `<main>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/configuration.rb:155:in `load_rackup'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/configuration.rb:99:in `app'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/runner.rb:114:in `load_and_bind'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/single.rb:79:in `run'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/lib/puma/cli.rb:214:in `run'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/gems/puma-2.16.0/bin/puma:10:in `<top (required)>'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/bin/puma:23:in `load'
from /home/pi/rails/phototank/shared/bundle/ruby/2.2.0/bin/puma:23:in `<main>'
我无法获取我的生产系统 运行ning。我遵循了出色的指南:https://www.ralfebert.de/tutorials/rails-deployment/ 来获得全部内容 运行ning。我从一个简单的演示应用程序开始,然后得到了 运行ning。之后,我对我的应用程序做了同样的事情。我有整个部署 运行ning,我可以启动 unicorn 和 nginx 而不会掉下来......但是没有雪茄......我从 nginx 得到 504 网关超时和 sh**load 中的错误nginx 日志。似乎 rails 根本没有抱怨...因为它不是真的 运行ning.
我可以在我的开发机器上 运行 相同的应用程序 - 所以它不应该是我的代码。我怀疑这可能是 gems 的一些依赖性问题 - unicorn 日志中的最后信息是 'Refreshing Gem list' 在它抛出之前
这是一些日志和设置:
Nginx 日志:
[2016-01-30T13:40:13.321375 #1608] ERROR -- : reaped #<Process::Status: pid 1924 exit 1> worker=0
I, [2016-01-30T13:40:13.322633 #1608] INFO -- : worker=0 spawning...
I, [2016-01-30T13:40:13.331328 #1931] INFO -- : worker=0 spawned pid=1931
I, [2016-01-30T13:40:13.332517 #1931] INFO -- : Refreshing Gem list
/home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': No such file to load -- Find (LoadError)
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/app/controllers/catalogs_controller.rb:1:in `<top (required)>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/pi/rails/phototank/releases/3/config/environment.rb:5:in `<top (required)>'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from config.ru:4:in `block in <main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `block in builder'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `call'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `build_app!'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:617:in `init_worker_process'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:639:in `worker_loop'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:283:in `join'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/bin/unicorn:126:in `<top (required)>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `load'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
E, [2016-01-30T13:40:17.174045 #1608] ERROR -- : reaped #<Process::Status: pid 1927 exit 1> worker=1
I, [2016-01-30T13:40:17.175791 #1608] INFO -- : worker=1 spawning...
I, [2016-01-30T13:40:17.183616 #1935] INFO -- : worker=1 spawned pid=1935
I, [2016-01-30T13:40:17.184766 #1935] INFO -- : Refreshing Gem list
/home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': No such file to load -- Find (LoadError)
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/app/controllers/catalogs_controller.rb:1:in `<top (required)>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/pi/rails/phototank/releases/3/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/pi/rails/phototank/releases/3/config/environment.rb:5:in `<top (required)>'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/pi/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from config.ru:4:in `block in <main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn.rb:46:in `block in builder'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `call'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:752:in `build_app!'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:617:in `init_worker_process'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:639:in `worker_loop'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:283:in `join'
from /home/pi/.rvm/gems/ruby-2.2.3/gems/unicorn-5.0.1/bin/unicorn:126:in `<top (required)>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `load'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/unicorn:23:in `<main>'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/pi/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
E, [2016-01-30T13:40:27.338467 #1608] ERROR -- : reaped #<Process::Status: pid 1931 exit 1> worker=0
I, [2016-01-30T13:40:27.339875 #1608] INFO -- : worker=0 spawning...
I, [2016-01-30T13:40:27.347598 #1939] INFO -- : worker=0 spawned pid=1939
I, [2016-01-30T13:40:27.348777 #1939] INFO -- : Refreshing Gem list
独角兽设置:
app_path = File.expand_path(File.join(File.dirname(__FILE__), '../../'))
#app_path = '/home/pi/rails/demo/releases/4'
listen '127.0.0.1:4000'
listen File.join(app_path, 'shared/unicorn.sock'), :backlog => 64
worker_processes 2
working_directory File.join(app_path, 'current')
pid File.join(app_path, 'shared/unicorn.pid')
stderr_path File.join(app_path, 'current/log/unicorn.log')
stdout_path File.join(app_path, 'current/log/unicorn.log')
nginx 设置:
upstream phototank {
server unix:/home/pi/rails/phototank/shared/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name 192.168.2.103;
root /home/pi/rails/phototank/current/public;
index index.htm index.html;
location / {
try_files $uri/index.html $uri.html $uri @app;
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://phototank;
}
}
server {
listen 80;
server_name 192.168.2.103;
return 301 http://192.168.2.103$request_uri;
}
Nginx 日志:
2016/01/30 13:19:59 [warn] 614#0: conflicting server name "192.168.2.103" on 0.0.0.0:80, ignored
2016/01/30 13:19:59 [warn] 781#0: conflicting server name "192.168.2.103" on 0.0.0.0:80, ignored
2016/01/30 13:47:36 [error] 785#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.2.70, server: 192.168.2.103, request: "GET /catalogs HTTP/1.1", upstream: "http://unix:/home/pi/rails/phototank/shared/unicorn.sock/catalogs", host: "192.168.2.103"
虽然我还没有找到答案,但我会关闭这个问题...不过我发现这就是问题所在:
Unable to load application: LoadError: No such file to load -- Find
我有一个控制器:
require 'Find'
class CatalogsController < ApplicationController
...
当我删除 'require Find' 时一切正常。我留给我一个关于如何在控制器中要求模块(查找)的新问题???