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.
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.