title: /usr/bin/env: ruby_executable_hooks : No such file or directory
body: <p>I'm trying to deploy to a Raspberry Pi using Capistrano 3.0 / Thin / NGINX I've got it working, but in my restart block I have </p>
  
  <pre><code>namespace :deploy do
  
    desc 'Restart application'
    task :restart do
      on roles(:app), in: :sequence, wait: 5 do
        execute '/etc/init.d/thin restart'
        execute 'sudo /etc/init.d/nginx restart'
      end
    end
  end
  </code></pre>
  
  <p>To which I am greated with </p>
  
  <pre><code> INFO [128fb9a3] Running /etc/init.d/thin restart on raspberrypi.local
  DEBUG [128fb9a3] Command: /etc/init.d/thin restart
  DEBUG [128fb9a3]    /usr/bin/env: 
  DEBUG [128fb9a3]    ruby_executable_hooks
  DEBUG [128fb9a3]    : No such file or directory
  DEBUG [128fb9a3]
  </code></pre>
  
  <p>I've tried the answer <a href="https://stackoverflow.com/questions/18936933/bundle-update-env-ruby-executable-hooks-no-such-file-or-directory">here</a> but with no success.</p>
  
  <p>The commands seem to work fine if I SSH into the PI and run them as root. </p>
  
  <p>I should mention that I pretty much used this tutorial: <a href="http://creativepsyco.github.io/blog/2013/04/10/deploying-rails-on-nginx-and-thin/" rel="nofollow noreferrer">http://creativepsyco.github.io/blog/2013/04/10/deploying-rails-on-nginx-and-thin/</a> to get things setup</p>