1
我正在使用slate,它运行的网页服务器的网址是bundle exec middleman server
。我想和主管坚持下去,但我无法弄清楚。通常从目录内运行命令就行得通。我试过的配置如下,我运行它时得到的错误也是如此。与主管运行'bundle exec middleman server'
如何正确运行这个守护程序?
主管.conf文件:
[program:slate]
directory=/home/vaindil/slate
command=/home/vaindil/.rvm/gems/ruby-2.3.1/bin/bundle exec middleman server
autostart=true
autorestart=true
stderr_logfile=/var/log/slate.err.log
stdout_logfile=/var/log/slate.out.log
错误:
/usr/bin/env: ruby_executable_hooks: No such file or directory
UPDATE:每马特的意见要求,我试图运行福尔曼和出口到supervisord。我从中得到一个不同的错误。
输出supervisord配置:
[program:app-web-1]
command=bundle exec middleman server
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/var/log/web-1.log
stderr_logfile=/var/log/web-1.error.log
directory=/home/vaindil/slate
environment=PORT="4567"
[group:app]
programs=app-web-1
的错误:
Warning: the running version of Bundler is older than/
the version that created the lockfile. We suggest you/
upgrade to the latest version of Bundler by running `gem install bundler`.
bundler: command not found: middleman
Install missing gem executables with `bundle install`
我可能会建议使用工头出口到上司,看看你有什么不同。 https://ddollar.github.io/foreman/#EXPORT-FORMATS 另外,对于它的价值,当我搜索特定的错误时,它与RVM和环境变量有关。可能是另一个开始的地方。 – Matt
@Matt我试了工头,使用'工头开始'完美地工作,但supervisord的输出输出不起作用。我会在一瞬间添加这个问题。 – vaindil
所以问题是'bundle'脚本在开始时有'#!/ usr/bin/env ruby_executable_hooks'行。 'env'命令无法在同一个目录中找到'ruby_executable_hooks'脚本。我可能需要''supervisor'配置中的一些'environment'设置。 –