Capistrano 工头无法导出 upstart 脚本,因为它试图以 root 身份运行命令

Capistrano foreman cannot export upstart scripts because it's trying to run commands as root

我正在使用 capistrano3-foreman gem 将我的应用程序部署到 centOS 服务器中的生产环境中,但 capistrano 正在尝试从 root 运行 foreman export 命令。由于我从一个在 sudoers 文件中没有密码权限的用户那里安装了 rvm 和其他东西,因此无法完成工头导出。

我收到以下错误。

sh: /root/.rvm/bin/rvm: No such file or directory

如何防止 capistrano-foreman 尝试以 root 身份运行命令并将其设置为我的用户主路径。

提前致谢

好的,自从 RHEL 和 CentOS 7 迁移到 systemd 后,第一个错误是试图将 foreman 导出到 upstart。

但是当我将 foreman 导出到 systemd 时,systemd 没有将 foreman 导出脚本识别为服务,因此它也没有工作。

经过数小时的工作和研究后,我决定抓住机会在 CentOS 7 上使用 supervisord,现在它的效果非常好。

http://supervisord.org/installing.html

请注意,Debian 和 Ubuntu 也在摆脱 upstart...