# Error Running Rails 3 Application under Phusion Passenger

**URL:** <https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935>\
**Category:** Rails\
**Created:** [October 3, 2010, 11:04am UTC](https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935 "2010-10-03T11:04:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfaine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Post date:** [October 3, 2010, 11:04am UTC](https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935/1 "2010-10-03T11:04:42Z")

</div>

I have a rails 3 application that runs without problems under WebRick  
(on Ubuntu) that generates the following error in the browser when I run  
under Apache2 with Phusion Passenger:

Ruby (Rack) application could not be started

Error message:

```
no such file to load -- bundler

```

Exception class:

```
LoadError

```

I have googled and found one or two posts with this problem but none  
with solutions.

Backtrace:

lib/rubygems/custom\_require\> 29:in `require' lib/rubygems/custom_require> 29:in`require’  
/usr/lib/ruby/gems/1.9.0/gems/passenger-2.2.15/lib/phusion\_passenger/utils.rb  
221 in `setup_bundler_support' /usr/lib/ruby/gems/1.9.0/gems/passenger-2.2.15/lib/phusion_passenger/rack/application_spawner.rb 105 in`block in run’  
…  
…

I tried installing the bundler gem but that didn’t change anything.

Any suggestions?

Thanks

---

<div class="post-metadata">

**Author:** ![mfaine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Post date:** [October 3, 2010, 5:25pm UTC](https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935/2 "2010-10-03T17:25:34Z")

</div>

On Oct 3, 11:04 am, Mark F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have a rails 3 application that runs without problems under WebRick  
> (on Ubuntu) that generates the following error in the browser when I run  
> under Apache2 with Phusion Passenger:
> 
> Ruby (Rack) application could not be started
> 
> Error message:
> 
> ```
> no such file to load -- bundler
> 
> ```

It means you need to install Bundler.

---

<div class="post-metadata">

**Author:** ![mfaine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Post date:** [October 3, 2010, 10:58pm UTC](https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935/3 "2010-10-03T22:58:36Z")

</div>

On Oct 3, 7:57 pm, Mark F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hongli L. wrote:
> 
> > It means you need to install Bundler.
> 
> From my original post:
> 
> > I tried installing the bundler gem but that didn’t change anything.
> 
> So if by this you mean something different or there is something  
> additional I need to do please specify.

Oops, sorry, totally looked over that part.

The most likely scenario is that you have multiple Ruby interpreters  
installed on your system. Let’s call them Ruby A and Ruby B. When you  
type ‘gem install bundler’ you probably installed Bundler into Ruby A,  
but you told Phusion Passenger to use Ruby B and so the gem  
installation didn’t have any effect on Phusion Passenger. Tell Phusion  
Passenger to use Ruby A, or install Bundler into Ruby B.

Or, you installed Bundler without ‘sudo’ and caused it to be installed  
into $HOME instead of system-wide.

---

<div class="post-metadata">

**Author:** ![mfaine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Post date:** [October 3, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935/4 "2010-10-03T19:57:14Z")

</div>

Hongli L. wrote:

> It means you need to install Bundler.

From my original post:

> I tried installing the bundler gem but that didn’t change anything.

So if by this you mean something different or there is something  
additional I need to do please specify.

Thanks

---

<div class="post-metadata">

**Author:** ![mfaine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Post date:** [October 3, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/error-running-rails-3-application-under-phusion-passenger/195935/5 "2010-10-03T23:57:12Z")

</div>

Hongli L. wrote:

> The most likely scenario is that you have multiple Ruby interpreters  
> installed on your system.

Yea I definitely had some Ruby version hell going on.

Thanks for pointing me in the right direction.

Mark
