小编Mik*_*bin的帖子

独角兽无法写pid文件

我正在使用Capistrano将Ruby on Rails应用程序部署到Linode VPS.我使用Unicorn作为应用程序服务器,使用Nginx作为代理.我的问题是,由于明显的权限问题,我无法启动Unicorn,但我很难跟踪它.

Unicorn开始使用此Capistrano任务:

task :start, :roles => :app, :except => { :no_release => true } do
    run <<-CMD
      cd #{current_path} && #{unicorn_bin} -c #{unicorn_config} -E #{rails_env} -D
    CMD
end
Run Code Online (Sandbox Code Playgroud)

我回来了,ArgumentError指示pid文件的路径不可写.

cap unicorn:start                                                                           master [d4447d3] modified
  * executing `unicorn:start'
  * executing "cd /home/deploy/apps/gogy/current && /home/deploy/apps/gogy/current/bin/unicorn -c /home/deploy/apps/gogy/shared/config/unicorn.rb -E production -D"
    servers: ["66.228.52.4"]
    [66.228.52.4] executing command
 ** [out :: 66.228.52.4] /home/deploy/apps/gogy/shared/bundle/ruby/1.8/gems/unicorn-4.1.1/lib/unicorn/configurator.rb:88:in `reload':
 ** [out :: 66.228.52.4] directory for pid=/home/deploy/apps/shared/pids/unicorn.pid not writable (ArgumentError)
 ** [out :: 66.228.52.4] from /home/deploy/apps/gogy/shared/bundle/ruby/1.8/gems/unicorn-4.1.1/lib/unicorn/configurator.rb:84:in `each'
 ** …
Run Code Online (Sandbox Code Playgroud)

ruby deployment file-permissions capistrano unicorn

17
推荐指数
1
解决办法
3万
查看次数

标签 统计

capistrano ×1

deployment ×1

file-permissions ×1

ruby ×1

unicorn ×1