title: Bundle Install - Rails on Ubuntu
body: <p>I have a problem with bundle install on production server. I have a fresh Droplet at DigitalOcean running Rails and Ubuntu 14.02. If I run as root:</p>
  
  <pre><code>bundle install
  </code></pre>
  
  <p>I get the following message and my application breaks, start getting "Bad Gateway" errors from Nginx:</p>
  
  <pre><code>Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
  </code></pre>
  
  <p>If I run bundle install as the rails user:</p>
  
  <pre><code>su rails
  bundle install
  </code></pre>
  
  <p>then I get this error:</p>
  
  <pre><code>sh: 1: bundle: not found
  </code></pre>
  
  <p>What am I missing? I've scoured the internet and tried every solution I can find and can't get it working quite right.</p>
  
  <p>Thanks for your help,</p>