Bundle stderr:ArgumentError:" ... tmp / pids / unicorn.pid"不可写如何解决?

时间:2017-07-26 08:10:02

标签: ruby-on-rails ubuntu nginx capistrano unicorn

我正在使用Capistrano部署代码,而在此过程中,我收到错误

SSHKit::Runner::ExecuteError: Exception while executing as deployer@IP: Exception while executing as deployer@IP: bundle exit status: 1
bundle stdout: bundler: failed to load command: unicorn (/home/deployer/apps/project/shared/bundle/ruby/2.4.0/bin/unicorn)
bundle stderr: ArgumentError: directory for pid=/home/deployer/apps/project/current/tmp/pids/unicorn.pid not writable

如何解决此问题?我是否需要在deploy.rb文件中设置内容?

我尝试手动创建pids目录,在777(mkdir -m 777 pids)上设置权限,但没有任何帮助。

如何使该目录可写?

1 个答案:

答案 0 :(得分:0)

这可能是this的副本。

你还确定路径是对的吗?我认为pids目录应该在_shared dir_之下而不是当前(这是realease/something的符号链接)

如果路径是硬编码,请尝试将其更改为/home/deployer/apps/project/shared/tmp/pids/unicorn.pid