Howto upgrade Passenger to 2.0.1

I noticed that Passenger 2.0.1 became available today and I decided to upgrade a couple of my Rails sites which are using it. The process was painless but there are some configuration changes to note when upgrading from 1.0.x. So here are the steps I took.

Update: I’d also like to confirm that fair load balancing is working properly with Passenger. This is a feature that I have wanted for some time and I’m glad to see it working.

  • /etc/init.d/apache2 stop
    • I find that stopping Apache is the best way to ensure plenty of memory on a VPS.
  • gem update
    • For those with Passenger installed this should update the gem to 2.0.1.
  • passenger-install-apache2-module
    • This command will build the apache2 module for the new version.
  • Update essential Passenger configuration
    • The LoadModule directives stays relatively unchanged except for the version number:
      1.0.5: LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
      2.0.1: LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.0.1/ext/apache2/mod_passenger.so
    • RailsSpawnServer has been obsoleted by PassengerRoot
      1.0.5: RailsSpawnServer /var/lib/gems/1.8/gems/passenger-2.0.1/bin/passenger-spawn-server
      2.0.1: PassengerRoot /var/lib/gems/1.8/gems/passenger-2.0.1
    • RailsRuby has been replaced by PassengerRuby
      1.0.5: RailsRuby /usr/bin/ruby1.8
      2.0.1: PassengerRuby /usr/bin/ruby1.8
  • Updating additional Passenter configuration
    • RailsUserSwitching and RailsDefaultUser have been replaced by PassengerUserSwitching and PassengerDefaultUser
    • RailsMaxPoolSize and RailsPoolIdleTime have been replaced by PassengerMaxPoolSize and PassengerPoolIdleTime.
  • /etc/init.d/apache2 start
    • Restart Apache and all should be well.

Trackback URL for this post:

http://hightechsorcery.com/trackback/159
Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License