2016-09-27 2 views
1

bundle exec middleman server 인 웹 서버를 실행하는 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` 
+0

. https://ddollar.github.io/foreman/#EXPORT-FORMATS 또한 특정 오류를 검색 할 때 RVM 및 환경 변수와 관련이 있습니다. 시작할 다른 장소 일 수 있습니다. – Matt

+0

@Matt 포먼 (foreman)을 시험해 보았습니다. '포먼 맨 (foreman) 시작'을 사용하면 완벽하게 작동하지만, 슈퍼 바이저 용 내 보낸 출력은 작동하지 않습니다. 잠깐 질문에 추가하겠습니다. – vaindil

+0

그래서'bundle' 스크립트는 시작시'#!/usr/bin/env ruby_executable_hooks' 라인을 가지고 있습니다. 'env' 명령은 같은 디렉토리에서'ruby_executable_hooks' 스크립트를 찾을 수 없습니다. 'supervisor' 설정에서'환경'설정이 필요할 수도 있습니다. –

답변

0

내가 그것을 작동 얻을 무슨 짓을 :

rvm wrapper ruby-version-here executable-hooks

예 : rvm wrapper ruby-2.3.1 executable-hooks

일단 래퍼에 추가 한 다음 래퍼 경로를 내 supervisor 구성에 추가하여 모두 작동시키기 시작했습니다.

귀하의 명령이 지금처럼 될 수 있습니다

command=/home/vaindil/.rvm/wrappers/ruby-2.3.1/bundle exec middleman server

내가 상사에 수출, 당신은 다른 아무것도 얻을 수 있는지 확인하기 위해 포먼을 사용하는 것이 좋습니다 수