title: Why is sudo: bundle command not found?
body: <p>Why is command "bundle" not found when using sudo:</p>
  
  <pre><code>[root@desktop gitlab]# sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
  sudo: bundle: command not found
  [root@desktop gitlab]#
  </code></pre>
  
  <p>but does exist when not using sudo:</p>
  
  <pre><code>[root@desktop gitlab]# bundle exec rake gitlab:setup RAILS_ENV=production
   Warning
    You are running as user root, we hope you know what you are doing.
    Things may work/fail for the wrong reasons.
    For correct results you should run this as user git.
  
  This will create the necessary database tables and seed the database.
  You will lose any previous data stored in the database.
  Do you want to continue (yes/no)? no
  Quitting...
  [root@desktop gitlab]#
  </code></pre>
  
  <p>The reason I ask is I am following <a href="https://github.com/gitlabhq/gitlab-recipes/tree/master/install/centos" rel="noreferrer">https://github.com/gitlabhq/gitlab-recipes/tree/master/install/centos</a>, and it states to use sudo.</p>
  
  <p>I've tried adding a <code>-i</code> flag as described by <a href="https://stackoverflow.com/questions/14647745/using-sudo-bundle-exec-raises-bundle-command-not-found-error">Using $ sudo bundle exec ... raises &#39;bundle: command not found&#39; error</a>, but get "This account is currently not available.".</p>