Project

General

Profile

Support #281

Updated by Daniel Curtis over 10 years ago

While moving all the administrative tools to *lxc-admin.altservice.com* 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: 
 <pre> 
 sudo gem install passenger 
 </pre> 

 * Then run the installer script: 
 <pre> 
 sudo passenger-install-apache2-module 
 </pre> 

 * Then update the Apache module configurations: 
 <pre> 
 sudo vi /etc/apache2/modules-available/passenger.conf 
 </pre> 
 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: 
 <pre> 
 sudo vi /etc/apache2/modules-available/passenger.load 
 </pre> 
 And replace the contents with: 
 > LoadModule passenger_module /var/lib/gems/1.9.1/gems/passenger-4.0.29/buildout/apache2/mod_passenger.so 

 h2. Troubleshooting 

 I got an error after restarting apache: 
 <pre> 
 sudo service apache2 restart 
 </pre> 
 > 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. 

Back