Converted to Passenger for development Part I
Jul 20 2009 // Comments
Part I: Ok, I've been a long time mongrel user -- however, I've recently switched over to passenger both for production and development. Why you ask? Simple. Keeping things simple and painless; plain and simple. Passenger is just requires less configuration and setup than the alternatives. Beware though, one size does not fit all. Passenger is not for every setup. There are reasons for not choosing Passenger which I will not go into right now.
For development: If you're using OSX, and need to run a rails project and find it not very DRY to start mongrels each time you work on a project, then jump on over to Passenger. As you are well aware, OSX has apache2 built-in. Therefore, Passenger is a apache module, and can be installed into the default apache server. To get started, visit http://www.modrails.com/.
To install passenger (assuming you have ruby, rails, and rubygem already installed):
sudo gem install passenger -v 2.2.4
passenger-install-apache2
Next add the following to: /etc/apache2/other/mod_rails.conf
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so
PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.4
PassengerRuby /opt/local/bin/ruby
# Set the default environment to development
RailsEnv development
Now restart apache2 to get it running -- you can do this by turning off/on web file sharing in your system preferences.
In my next post, I'll provide links to install a preference pane that will aid in configuring apache vhosts and host entries for local name resolution.

Ruby and Rails developer with extensive web development
background in various technologies. Active private pilot and
technology enthusiast always looking for excuse to fly.