我一直在尝试遵循this教程,以使用nginx和thin部署我的rails应用程序,我还使用capistrano来部署代码。
我已经按照博客中的描述进行了所有设置,但是当我尝试启动瘦服务器时,它们会在日志中显示以下消息退出
:Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting!
/home/me/myapp.com/shared/bundle/ruby/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- thin/connection (LoadError)
from /home/me/myapp.com/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
from /home/me/myapp.com/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
from /home/me/myapp.com/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/tcp_server.rb:16:in `connect'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/base.rb:63:in `block in start'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in `start'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/server.rb:162:in `start'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:87:in `start'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/runner.rb:203:in `run_command'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/runner.rb:159:in `run!'
from /home/me/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thin-1.7.2/bin/thin:6:in `<top (required)>'
from /home/me/.rbenv/versions/2.4.1/bin/thin:22:in `load'
from /home/me/.rbenv/versions/2.4.1/bin/thin:22:in `<main>'
这是配置文件(/etc/thin/myapp.com):
chdir: "/home/me/myapp.com/current"
environment: production
address: 0.0.0.0
port: 3000
timeout: 30
log: "/home/me/myapp.com/shared/log/thin.log"
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 100
require: []
wait: 30
threadpool_size: 20
servers: 3
daemonize: true