Support #281
Upgrading Phusion Passenger on Debian
Description
I encountered a problem where I needed to have multiple versions of Ruby on the same instance of Phusion Passenger. I found a forum online that mentioned that starting with Passenger 4 multiple PassengerRuby definitions in the virtual host configuration can be used. The problem being Debian Wheezy currently uses Passenger 3. Upgrading Passenger is not difficult.
- First install the Passenger gem:
sudo gem install passenger
- Then run the installer script:
sudo passenger-install-apache2-module
- Then update the Apache module configurations:
sudo vi /etc/apache2/modules-available/passenger.conf
And replace the contents with:
PassengerRoot /var/lib/gems/1.9.1/gems/passenger-4.0.29
PassengerDefaultRuby /usr/bin/ruby1.9.1
And also:
sudo vi /etc/apache2/modules-available/passenger.load
And replace the contents with:
LoadModule passenger_module /var/lib/gems/1.9.1/gems/passenger-4.0.29/buildout/apache2/mod_passenger.so
Troubleshooting¶
I got an error after restarting apache:
sudo service apache2 restart
Syntax error on line 8 of /etc/apache2/sites-enabled/puppetmaster:
Invalid command 'RackAutoDetect', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
To fix this, I had to edit the /etc/apache2/sites-enabled/puppetmaster
and remove the following lines:
RackAutoDetect Off
RailsAutoDetect Off
I also encountered a problem with getting the correct version of Ruby to run for the puppet master server. The problem was that I had the PassengerRuby
directive set globally in the virtual host configuration, this is a problem because PassengerDefaultRuby
is set to a different version of ruby. The fix was simple, by removing the PassengerRuby
directive from the global virtual host and replacing it inside of the virtual directory configuration.