通过unicorn master -E production -c config/unicorn.rb -D
启动 unicorn 的时候 遇到下面得错误
/usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:659:in `parse_rackup_file': rackup file (master) not readable (ArgumentError)
from /usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:77:in `reload'
from /usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:68:in `initialize'
from /usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:100:in `new'
from /usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:100:in `initialize'
from /usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `new'
from /usr/home/vps1/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
from /usr/home/vps1/.rbenv/versions/2.1.5/bin/unicorn:23:in `load'
from /usr/home/vps1/.rbenv/versions/2.1.5/bin/unicorn:23:in `<main>'
部署方式 选择的是 nginx + unicorn 之前运转一直良好,直到被我 kill 掉以后就一直启不来,unicorn 的配置方式也是参考的 railscasts 上的,具体配置
working_directory "/usr/home/vps1/appname"
pid "/usr/home/vps1/appname/tmp/pids/unicorn.pid"
stderr_path "/usr/home/vps1/appname/log/unicorn.error.log"
stdout_path "/usr/home/vps1/appname/log/unicorn.log"
listen "/tmp/unicorn.appname.sock"
worker_processes 2
timeout 30
各位有谁遇到过类似部署问题,求线索啊~
找到原因了,命令格式错了,应该是 unicorn -E production -c config/unicorn.rb -D
,删掉前面出现得master
即可。我是直接从ps aux | grep unicorn
的输出中粘过来的 ⊙﹏⊙b 汗,这里贴一下,希望帮到遇到同样错误的人