Reputation: 1067
I'm using RVM and running Passenger on Apache; I'm getting this error - no such file to load -- bundler.
I'm using ruby-1.9.2-head for my deployment and I do have bundler installed here, but I have a feeling Passenger is loading the wrong gems, by the Backtrace output:
0 /usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
1 /usr/local/rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
2 /usr/local/rvm/gems/ruby-1.9.2-head/gems/passenger-3.0.9/lib/phusion_passenger/utils.rb 325 in `prepare_app_process'
The first two lines have ruby-1.8.7-head in the path, is that correct? (The rest of the Backtrace lines have ruby-1.9.2-head.)
I have the following in my apache2.conf file:
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-head/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-head/gems/passenger-3.0.9
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-head/ruby
Why is it loading ruby-1.8.7-head? Is that what I need to fix? (At one point I did have passenger installed here, but I uninstalled the gem.)
Upvotes: 2
Views: 761
Reputation: 1067
I figured it out. I had another enabled site that must have been overriding the Ruby version that Passenger was using.
In the configuration of my other site this was in there:
PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-head/ruby
Once I disabled this site, everything works as expected.
Upvotes: 2