Ruby Enterprise Edition - Mac OS X problem 4

Posted by marcin
on Saturday, July 26

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!

Google I/O, San Francisco

Posted by marcin
on Thursday, May 01

It’s stating the obvious that the company I’m working for is the coolest company in the world :) From time to time I’m being sent over to the various conferences like Future Of the Web Apps, dConstruct, RailsConf, etc… This time I got lucky and am going to San Francisco to take part in Google I/O. The agenda looks really good! Am especially interested in GoogleAppEngine, the new cool way of deploying your web apps using Google’s super fast and scalable infrastructure, for free! GoogleGears, APIs, OpenSocial and other sessions seem to be very promising, too. Can’t wait… Will follow up with the conference review when I’m there…

New iToy

Posted by marcin
on Saturday, April 19

After so many months of waiting and just a month or two before release of the 3G model I decided to buy an iPhone, well two iPhones. As am rather not keen on signing up for 18-month contract with O2 I will either end up with this device holding papers on my desk or jailbreak it :) Finally I will have an opportunity to write and test some native apps for the Touch platform… Can’t wait!