Fabrício
Fabrício

Reputation: 1090

Passenger using Ruby system version instead of Ruby from RVM

I'm using RVM (1.19), Passenger (3.0.19), Apache on a Debian environment.

I tried update the ruby version from 1.8.7 to 1.9.3 using RVM. The following steps were executed:

LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby

After all, my application is still using Ruby 1.8.7 and Passenger is getting gems from '/var/lib/gems/1.8/gems/'. So I guess Passenger is ignoring the configuration in mod_rails.load.

Does anyone know how resolve this problem?

Upvotes: 1

Views: 1007

Answers (1)

danmanstx
danmanstx

Reputation: 1712

what does ruby -v output?

if it is 1.8.7 try rvm use 1.9.3 and be sure that 1.9.3 is set as the default.

rvm default 1.9.3

and that your .rvmrc is sourced in your .bash_profile something like:

`[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"`

also what does which rvm return? that should be the start of file path you use to load gems from. its normally something like /Users/local/.rvm

Upvotes: 0

Related Questions