title: Run 'bundle exec middleman server' with supervisor
body: <p>I'm working with <a href="https://github.com/lord/slate" rel="nofollow">slate</a>, which runs a web server with <code>bundle exec middleman server</code>. I'd like to persist this with supervisor, but I can't figure out how. Running the command normally from within the directory works just fine. The config I've tried is below, as is the error I get when running it.</p>
  
  <p>How can I properly run this as a daemon?</p>
  
  <p>supervisor .conf file:</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>/usr/bin/env: ruby_executable_hooks: No such file or directory
  </code></pre>
  
  <p><strong>UPDATE:</strong> Per Matt's request in the comments, I tried running Foreman and exporting to supervisord. I get a different error from that.</p>
  
  <p>The output supervisord config:</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>The errors:</p>
  
  <pre><code>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`
  </code></pre>