Last weekend I decide to play a bit with Ruby Enterprise Edition to do some performance testing and especially memory footprint. The installation process of REE went as smooth as it could – personally I’m a big fun of the installers which guide user through the installation giving all the hints on the spot (well done guys!). After installation had finished I just couldn’t wait any longer to bind it with Phusion Passenger and see it in action. Also, as my mod_rails installation got a bit old (1.0.5) I decided to update it to the newest available version (currently 2.0.2). NOTE: if you upgrade from mod_rails 1.0.5 to 2.0.2 you need to change your Apache configuration file:
- RailsRuby directive is now called PassengerRuby
- RailsSpawnServer is now obsolete and you should use PassengerRoot instead.
I changed my httpd.conf file accordingly:
PREVIOUS CONFIGURATION FOR PASSENGER 1.0.5 AND REGULAR RUBY 1.8.6
#LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
#RailsSpawnServer /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
#RailsRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
NEW CONFIGURATION FOR PASSENGER 2.0.2 AND RUBY ENTERPRISE EDITION
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.0.2
PassengerRuby /private/opt/ruby-enterprise-1.8.6-20080709/bin/ruby
Note that PassengerRuby path leads to the Ruby Enterprise Edition installation folder.
After configuration change all you need to do is to restart your Apache, launch your application and benefit from lower memory footprint. In the end I was quite disappointed when I saw this error messages in Apache’s error_log file:
[Sat Jul 26 19:33:22 2008] [notice] Apache/2.2.6 (Unix) DAV/2 PHP/5.2.5 Phusion_Passenger/2.0.2 configured -- resuming normal operations
/Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/passenger/native_support.bundle: [BUG] Bus Error
ruby 1.8.6 (2008-03-03) [i686-darwin9.2.2]
[Sat Jul 26 19:33:52 2008] [error] [client ::1] *** Unexpected error in Passenger: Cannot spawn application '/Users/xyz/Sites/my_rails_app': The spawn server has exited unexpectedly.
I’m not sure if this is problem specific to Mac OS X but noticed a few similar issues reported on the internet. Hoping that issue will be fixed very soon. Once it happens I’m going to give it another go and follow with some updates. Stay tuned!






