Putting the pane back into deployment
To get the latest version, please see the Passenger preference pane page.
We blogged how using Passenger made development easier, but being the Mac User Interface Junkies we are, we’d like to take it one step further.
This was a great opportunity to play with preference panes in RubyCocoa. Thanks to Jason Foreman, and his repository of templates, I didn’t have to spend a lot of time finding out how to initialize a prefPane bundle.
It turns out that creating basic features with a mediocre interface (the default stuff you get from Interface Builder) can be done fairly quickly. However, making it look and feel like a preference pane from the “OEM fruit company” is a different story. Who would have thought?! ;)

Thijs doing interface design with the latest available technologies. Can you spot the advanced z-index technique he used? Hint: Starts with a P.
Anyways, back to the introduction; after roughly 2 weeks we give you an OS X System Preferences pane that will configure Apache and set up a local hostname for running any Rails application using Phusion Passenger. Getting your Rails app up and running is now a matter of seconds.
Most users probably want to download the “stable” 1.0 release.
If you understand why stable has been quoted, you can track development and contribute on: github.com/alloy/passengerpane
Please report any bugs you may find at: fingertips.lighthouseapp.com/projects/13022
Note that Passenger preference pane requires OS X 10.5.2 (or at least 10.5.0 and install RubyCocoa 0.13.2 yourself) and Passenger 2.0.1.
Comments
Add your comment
In order to fight spam on this blog, posting comments from a browser without javascript is currently not supported.
Subscribe
Jordan Arentsen about 9 hours later: (delete | show email)
Very nice, I definitely plan on using this when I move to Leopard. ¶
Erik about 10 hours later: (delete | show email)
Fantastic. Does exactly what I've been manually doing.
It'd be nice if it warned you when you have "Web sharing" turned off. ¶
gaur about 10 hours later: (delete)
Is the hours project available ? ¶
Thijs van der Vossen about 19 hours later: (delete)
The hours project is internal for now. ¶
Tom about 20 hours later: (delete)
That is very handy and we'll be using it on our showcase laptops, however for me it's no good for development because I can't jump into a debugger irb console like you can with script/server. ¶
Eloy Duran about 20 hours later: (delete)
@Tom: Technically ruby-debug does support remote debugging, so it should be possible. I haven't tried it yet though... ¶
topfunky 1 day later: (delete | show email)
Impressive! I keep my Passenger config in source control so I can use it between machines, but this is such a nice interface that it makes me want to use it anyway! ¶
Thijs van der Vossen 1 day later: (delete)
@topfunky: The Passenger preference pane stores the Apache configuration in /etc/apache2/passenger_pane_vhosts/ so you should be able to version that.
Also, if you don't need to customize the Apache configuration you can configure all the Rails applications you're working on at once by dragging multiple folders into the source list. ¶
Sander Heilbron 2 days later: (delete | show email)
Very nice, thanks guys! ¶
Marcus 3 days later: (delete)
This is awesome. Thanks. ¶
Jason Foreman 3 days later: (delete | show email)
Looks great Eloy! Glad you found my template to be of some use. ¶
Jonno 3 days later: (delete)
Does it support rack apps? ¶
Manfred Stienstra 5 days later: (delete)
Jonno, I don't think it needs to explicitly support Rack apps because you basically just point Passenger to a directory and it automatically looks to either Rails environment files, Rack config.ru or WSGI python stuff.
So in short; it should work. ¶
Cesidio 5 days later: (delete)
Thanks for this great product.
what about adding options for setting:
ErrorLog (defaults to log/error.log in your app would be very nice)
RailsBaseURI (which is also very common) ¶
Manfred Stienstra 6 days later: (delete)
Cesidio, we're not going to support any more configuration options. The idea is to only support quick and fast configuration from the user interface.
You can drag the domain name from the source list into your favorite editor to quickly open the vhost file. That way you can do advanced configuration. ¶
Alistair Holt 6 days later: (delete | show email)
Excellent guys. You beat me to it!
One question - This still requires manual additions to /etc/hosts to get the *.local addresses doesn't it? ¶
Alistair Holt 6 days later: (delete | show email)
Answered my own question about /etc/hosts heh. Cheers! ¶
Manfred Stienstra 6 days later: (delete)
No, the pane adds the local hostnames to the Directory Services. You can look at the entries with:
$ dscl localhost -list /Local/Default/Hosts ¶
Michael Erb 6 days later: (delete)
Exactly the way it should work. Brilliant guys, really, well done! ¶
gerry leo nugroho 6 days later: (delete | show email)
Hi,
I'm on Mac OS X (10.4.11), I've upgraded my RubyCocoa and Passenger as instructed. But, I couldn't get it to work as intended? Any ideas why? Here's a <a href="Installing PassangerPane on Mac OS X (10.4.11)" title="Installing PassangerPane on Mac OS X (10.4.11)">screenshoot</a> of what I got so far. Hope you could help me, Cheers. ¶
gerry leo nugroho 6 days later: (delete | show email)
Ouch... mind my previous posting... the screenshoot is <a href="http://www.flickr.com/photos/leonism/2626216383/" />here</a>.
Forgot to put the URL. ¶
Eloy Duran 6 days later: (delete)
Sorry, atm the pane only works on Leopard. I have updated the requirements to be more specific about this.
The problem in the interface with the +/- buttons is because the NSImage template support was added in Leopard. The Warning s still shown because we assume the Apple supplied Apache 2 in Leopard.
There are no plans to update this, but feel free to hack on it :) ¶
Michael Boutros 7 days later: (delete | show email)
For this to work on my MacBook, I have to go into the Preference Pane-generated .conf file and change <VirtualHost *:80> to <VirtualHost name.local:80>. Does anyone know why this may be?
Thanks! ¶
Tim 8 days later: (delete)
I'm running Leopard and originally installed Apache2 from source as the link from Passenger's site had shown... I have everything working great normally/manually. But the PrefPane doesn't do a thing for me. Says the extension isn't there... but in fact it is. Am I missing something obvious? ¶
Manfred Stienstra 8 days later: (delete)
Michael, are you sure that what was made it work and not an Apache restart or something?
Tim, the pane only works with default Leopard installation paths right now.
If you think this is a bug, please create a ticket here: http://fingertips.lighthouseapp.com/projects/13022 ¶
Tim 9 days later: (delete)
Manfred, ah no worries mate... I killed the added item in the path for the custom Apache2 install and reinstall the passanger module for the Leopard default install and everything is working great. Seriously... awesome work! ¶
Manfred Stienstra 9 days later: (delete)
Tim, good to hear it worked out for you. ¶
Chuck Bergeron 15 days later: (delete | show email)
Hey guys, great work! This is super handy. I'm having a small issue with my typical DocumentRoot conflicting with the VirtualHost entries setup in /etc/apache2/passenger_pane_vhosts - Currently, when I leave the ServerName as *:80, the Rails apps work great but the typical http://localhost/ loads the first VHost entry, and http://localhost/myadmin/ redirects to http://localhost:3000
Any ideas? I assume this is just my lack of understanding ye olde httpd.conf and those vhost entries.
Thanks!
` Chuck ¶
Manfred Stienstra 15 days later: (delete)
Chuck, I'm afraid you're going to have to debug those problems yourself. One tip though; if one of the VirtualHosts conflicts with your default DocumentRoot, you might want to move that to a VirtualHost too.
People on one of the Apache mailing lists (http://httpd.apache.org/lists.html) might be able to help you out with with any more questions you might have. ¶
Chuck+Bergeron 16 days later: (delete | show email)
Great, thanks Manfred! I'll give that a try. ¶
Chuck+Bergeron 16 days later: (delete | show email)
Yup! Setting up localhost as a vhost worked like a charm! Thanks again, Manfred. ¶
Jamie 21 days later: (delete)
This is fantastic! My only gripe is that it is Rails centric, and I had to manually edit the generated files to work with my Merb apps. How about a toggle between Rails and Rack apps, or at least a textbox in the pane that let's us customize the apache include files? ¶
Thijs van der Vossen 21 days later: (delete)
Jamie, you can drag an item from the source list onto your favourite editor if you need to customize the configuration files. IMHO that's a much nicer interface for advanced users. ¶
riki 47 days later: (delete | show email)
I'm getting the following error.
Can’t find the Phusion Passenger Apache module. Visit http://www.modrails.com for installation instructions. ¶
riki 47 days later: (delete | show email)
Never mind, still mistake on my part, it's working now. ¶
Lucas Efe 48 days later: (delete | show email)
Mmm, I am having some issues here.
I add the rails folder into de PrefPane, apply and quit. But when I return to the PrefPane I get an empty window. The configuration is missing. Also, no file is created in the apache folder.
Any idea?
PS: I have ruby built from source, in a custom location, but included in the PATH. ¶
Lucas Efe 48 days later: (delete | show email)
Forget about this. I am creating a ticket ath the lighthouse.
:) ¶
Douglas F Shearer 49 days later: (delete | show email)
Slightly OT, but what's the keyboard in the pic? Looks like a Happy Hacker Mac edition, something I've been trying to get hold of for a long time.
Awesome pref pane btw, makes life so much easier. ¶
Manfred Stienstra 49 days later: (delete)
Douglas, it's a normal grey Happy Hacking Keyboard Lite 2: http://pfuca-store.stores.yahoo.net/haphackeylit1.html ¶
salomoko 51 days later: (delete)
SO freakin sweet dude!
thanks much, however, one question; Where does the pref pane store the vhosts directives file? I have plenty of existing apps running under passenger already and I put my directives in /etc/apache2/extra/httpd-vhosts. I'd like to consolidate my directives.
any thoughts? ¶
Manfred Stienstra 51 days later: (delete)
The virtual host configuration is written to /etc/apache2/passenger_pane_vhosts. ¶
salomoko 52 days later: (delete)
thanks lots! ¶
Bryce 59 days later: (delete | show email)
Really great PrefPane. I use Apache VirtualHosts extensively with non-Rails projects, and I hate having to add the config files and edit /etc/hosts for each one, it would be great if you could make a general Apache Virtual Host Preference Pane for those who don't use Rails. ¶
Douglas 62 days later: (delete | show email)
I really appreciate you putting this out there. Now I get pretty URL's in development too. ¶
Daniel 73 days later: (delete)
Glorious. Thanks! ¶
pyrotechnick 78 days later: (delete)
Bryce,
Check out headdress. It allows you to manage apache virtual hosts. ¶
Jason Calleiro 98 days later: (delete)
Before downloading the prefpane i had a bunch of virtual hosts set up to some php sites in /private/etc/apache2/extra/httpd-vhosts.conf. After installing the prefpane they seem not to be working. I saw that it creates another conf file. i tried adding them there, but they dont seem to work. any ideas? ¶
Manfred Stienstra 98 days later: (delete)
Jason, I think that's a general Apache configuration problem. The prefpane only adds virtual hosts to the configuration. You might want to check if the names of the virtual hosts conflict with the virtual hosts you defined in httpd-vhosts.conf.
For more questions you might want to try one of the Apache mailing lists (http://httpd.apache.org/lists.html). ¶
marvin 145 days later: (delete | show email)
I have been getting this error
Forbidden
You don't have permission to access / on this server.
Any ideas? I followed the peepcode tutorial to the last detail and no luck.
Marvin ¶
Manfred Stienstra 145 days later: (delete)
There should be a line in the configuration somewhere that says:
<directory "/Users/manfred/Code/myproject">
Order allow,deny
Allow from all
</directory>
Make sure that the directory it points to is correct. You can find the Passenger Pane virtual host configuration files in /etc/apache2/passenger_pane_vhosts. If you keep having problems it's probably easier to discuss your problem on the Apache mailing list of on IRC somewhere. ¶
marvin 146 days later: (delete)
This is in my passenger_pane_vosts file:
<VirtualHost *:80>
ServerName test.local
DocumentRoot "/Users/marvin/Desktop/test/public"
RailsEnv development
RailsAllowModRewrite off
<directory "/Users/marvin/Desktop/test/public">
Order allow,deny
Allow from all
</directory>
</VirtualHost>
this was generated by the panel program, any ideas? ¶
Manfred Stienstra 146 days later: (delete)
Nope, we would have to see your whole configuration. That's why it's probably a better idea to discuss this on a mailing list. ¶
stephan@stephan.com 163 days later: (delete)
Feature request: I have a "local" environment set up for development on my laptop, with sightly different settings from my development server - e.g. sqlite instead of mysql.
Can you add an option to allow an arbitrary environment to run in, rather than just development/production? Easiest would be a pulldown menu that looks in config/environments for choices, alternate could be a text box to fill in "other". ¶
erwin 164 days later: (delete)
installed from .dmg (10.5, rubycocoa and passenger installed) but error in auching the panel
Dec 6 12:01:59 MacErwin [0x0-0x2d02d].com.apple.systempreferences[505]: /System/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/cocoa.rb:8
Dec 6 12:01:59 MacErwin [0x0-0x2d02d].com.apple.systempreferences[505]: /Users/yves/Library/PreferencePanes/Passenger.prefPane/Contents/Resources/PassengerPref.rb:1:in `require'
Dec 6 12:01:59 MacErwin [0x0-0x2d02d].com.apple.systempreferences[505]: /Users/yves/Library/PreferencePanes/Passenger.prefPane/Contents/Resources/PassengerPref.rb:1
Dec 6 12:02:37 MacErwin System Preferences[509]: RBBundleInit: LoadError: no such file to load -- nkf
Dec 6 12:02:37 MacErwin System Preferences[509]: *** -[PassengerLoader initWithBundle:]: unrecognized selector sent to instance 0x1907f6f0
Dec 6 12:02:37 MacErwin System Preferences[509]: [NSPrefPaneBundle instantiatePrefPaneObject] (/Users/yves/Library/PreferencePanes/Passenger.prefPane): error occurred during instantiation.
Dec 6 12:02:37 MacErwin [0x0-0x2e02e].com.apple.systempreferences[509]: /System/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/cocoa_macros.rb:8:in `require' ¶
Manfred Stienstra 164 days later: (delete)
Erwin, can you make sure you installed the latest version of the pane (1.2) and post your problems to the Lighthouse project page? http://fingertips.lighthouseapp.com/projects/13022 ¶
Eloy Duran 167 days later: (delete)
@Stephan: There is already support for arbitrary environments, however we won't add any new UI elements for this. What you should do is, for instance, drag the app from the source list to your text editor and edit the environment in place. The pref pane will then not mess with your custom environment setting. ¶
Chris Roos 176 days later: (delete | show email)
I hope you don't mind but I took the liberty of borrowing the ideas behind your preference pane and turning them into a script[1] that I can use to set-up simple static sites (for use with webby as an example).
[1] http://chrisroos.co.uk/blog/2008-12-15-a-utility-to-manage-apache-virtual-hosts-on-a-mac-like-the-passenger-pref-pane-but-for-simple-static-sites ¶
rashid 201 days later: (delete)
Tanks! ¶
milos 347 days later: (delete)
OMG that was easy, thanks ¶
Gabriel Rinaldi 385 days later: (delete | show email)
Hi,
Do you have plans on supporting Snow Leopard? I tried to install it but the preference pane does not open. I also tried to recompile it, but I had no success.
Thanks! ¶
Jared Dobson 392 days later: (delete | show email)
This is super amazingly awesome!!
Is it production worthy for use on a mac os x server? :-)
Thanks! ¶
Manfred Stienstra 397 days later: (delete)
@Gabriel, we will work on it as soon as we can get our hands on Snow Leopard. Unfortunately we're not cool enough to receive developer seeds.
@Jared, it should work just fine on Mac OS X server. We've been using the pane on our development machines for about 12 months now so we think it's certainly mature enough (: ¶
Eloy Duran 404 days later: (delete)
@Gabriel There are some SL specific fixes for RubyCocoa, which won't be available until SL is released afaik. ¶
Gyuri 407 days later: (delete)
@Jason Calleiro: your extras/httpd-vhosts.conf is disabled by Passenger I reckon. I had to re-enable it myself as well. Edit /private/etc/apache/httpd.conf; look for the lines:
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
Unquote this include line (remove the '#'), save and restart apache. Now Apache will use both your extras vhosts and passengers. ¶
mpearce 430 days later: (delete)
Regarding Snow Leopard - Nope. The pane switches to 32 bit mode and hangs. The etc/hosts looks like it was also overwritten as well. Ruby "upgraded" to 1.8.7 BTW. I think I'm going to take this moment to install REE and nginx on the development environment - I avoided it because the pref pane was just so freakin' easy. ¶
mpearce 433 days later: (delete)
Listing your temp fix for snow leopard until the new version:
http://www.gregbenedict.com/2009/08/29/fixing-ruby-gems-mysql-and-passenger-phusion-on-snow-leopard-10-6/ ¶
hvillero 482 days later: (delete)
Very nice, It is working for me with me Snow Leopard, the pane close the System Preferences pane and then it switches to 32bit mode opening and working great, thank you. good work guys ¶
Leonardo 515 days later: (delete)
is the panel compatible with snow leopard?
i have installed in my macbook but when i click in passenger icon only a gray screen empty is showed.
thanks buddies ¶
Eloy Duran 516 days later: (delete)
Leonardo: Please see the page for the latest PassengerPane version, 1.3: http://www.fngtps.com/2009/09/new-os-more-pane-passenger-preference-pane-v1-3 ¶
Daniel Cukier 517 days later: (delete)
For http request it works fine, but how can I make it work for SSL requests (https)? My Apache is already configured and with working certificates ¶
Manfred Stienstra 519 days later: (delete)
Well, if it's already configured you probably shouldn't change a thing.
The prefpane doesn't support SSL configuration, you will have to do that manually. There is documentation on how to configure Apache with SSL all over the web, and your SSL certificate provider can probably also help you out. ¶