title: Ruby Passenger: no such file to load bundler
body: <p>I installed Phusion Passenger with Nginx, configured Nginx to point to the right directory, Then I ran webapp directory and this has downloaded the gemfiles, but it can't find the gems.</p>
  
  <p>When I visit the site I get the standard Passenger error page which says:</p>
  
  <pre><code>Error message:
  no such file to load -- bundler
  </code></pre>
  
  <p>Here's the full error: <a href="http://tinypic.com/view.php?pic=vpx36r&amp;s=7" rel="noreferrer">http://tinypic.com/view.php?pic=vpx36r&amp;s=7</a></p>
  
  <p>I've do a <code>gem install bundler</code> so I know bundler is installed, but I think it's looking in the wrong place for the gems.</p>
  
  <p>It appears as if Passenger has installed ruby-enterprise-1.8.7 and it looks like 1.8 was already installed in this box.</p>
  
  <p>gem env gives me the following:</p>
  
  <pre><code>  - RUBYGEMS VERSION: 1.4.2
    - RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
    - INSTALLATION DIRECTORY: /opt/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
    - RUBY EXECUTABLE: /opt/local/ruby-enterprise-1.8.7-2010.01/bin/ruby
    - EXECUTABLE DIRECTORY: /opt/local/ruby-enterprise-1.8.7-2010.01/bin
    - RUBYGEMS PLATFORMS:
        - ruby
        - x86_64-linux
      - GEM PATHS:
        - /opt/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
   - /root/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources =&gt; true
         - :verbose =&gt; true
         - :benchmark =&gt; false
         - :backtrace =&gt; false
         - :bulk_threshold =&gt; 1000
      - REMOTE SOURCES:
         - http://rubygems.org/
  </code></pre>
  
  <p>From what I've read it appears to be a path issue, but I don't know what the best course of action is to fix it. </p>
  
  <p>Here's the output of </p>
  
  <p>which ruby:</p>
  
  <pre><code>/opt/local/ree/bin/ruby
  </code></pre>
  
  <p>which bundle:</p>
  
  <pre><code>/opt/local/ree/bin/bundle
  </code></pre>
  
  <p>I've run bundle install in that directory and it's given me:</p>
  
  <pre><code>Your bundle is complete! It was installed into ./vendor/bundle
  </code></pre>