bundle exec middleman server
のWebサーバを実行するslateと連携しています。私はスーパーバイザーとこれを維持したいと思いますが、どのように把握できません。通常はディレクトリ内からコマンドを実行するだけで問題ありません。私が試した設定は以下の通りですが、実行時のエラーもそうです。スーパーバイザを使用して '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私はForemanを試してみましたが、 'foreman start'は完璧に動作しますが、supervisordの出力は動作しません。私は質問にそれを瞬時に追加します。 – vaindil
問題は、 'bundle'スクリプトの先頭に'#!/ usr/bin/env ruby_executable_hooks'行があることです。 'env'コマンドは同じディレクトリ内の' ruby_executable_hooks'スクリプトを見つけることができません。 'supervisor'設定に'環境 '設定が必要な場合があります。 –