2
votes

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

1
Have you checked out the possible additional steps at the RVM site? Looks like there might be a script or two you may need to drop in. - numbers1311407
Don't yell at me for this comment not helping, but i was using this setup for a while and using passenger on the host i was on turned into a massive headache. Ultimately I got it working after a million support tickets, etc, in the days to come i switched over to heroku. Now i enjoy 'git push heroku' and life is beautiful - jBeas
Thanks for the suggestion numbers1311407, but I figured it out. I had another site enabled that must have been overriding the Ruby version that Passenger was using. (Just waiting to post the answer, since I have less than 100 reputation, I have to wait 8 hours to answer my own question.) - double free

1 Answers

2
votes

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.