If you do any Rack or Ruby on Rails development, you should checkout Pow, the zero configuration Rack server for OS X.
Pow makes getting up and running with these apps dead simple. No running
one app at a time, no Apache/Passenger configs to setup, no mucking with
. Pow doesn’t
require special privileges (runs as your user), with no gems or
extensions to intall. Just Pow, and it installs in seconds.
From the manual:
How does it work? A few simple conventions eliminate the need for tedious configuration. Pow runs as your user on an unprivileged port, and includes both an HTTP and a DNS server. The installation process sets up a firewall rule to forward incoming requests on port 80 to Pow. It also sets up a system hook so that all DNS queries for a special top-level domain (.dev) resolve to your local machine.
###The good and bad: ###
You can configure that last one, and it’s simple to do so, incase you do any other type of development where you already have something like Apache setup to handle those requests. Without configuring otherwise Pow will respond instead and likely not know what to do.
###Setup and adding Apps###
Installation requires authentication simply because it creates a new Firewall rule.
It’s that easy. Uninstallation is just as easy too:
Pow creates a
directory in your home folder. To setup an app
there and create a symlink:
and you’re rack app will load
before your awe-struck eyes.
###But what about my port 80?###
Yeah, you probably want that back huh… Fortunately you have some options there, detailed on this helpful wiki on the Pow Github project. It outlines two steps, but depending on your desired setup, you may be fine with just the first one.
####Without adjusting Apache####
file and put the following there:
On Boot, Pow will read that file for any configuration options (more here). This tells Pow not to use port 80, but instead use port 88.
From there forward, just add
to your app urls, a la
. Apache will still use port 80 and your other
apps will be fine, while any Pow app now responds to
If you like the idea of not having to specify a port at all, you can
do the additional step of adding an Apache conf file in
instructing Apache to act as a reverse proxy for
Pow instead. This allows you to have your Pow apps respond at
, while maintaining your current Apache process.
The naming is important because Apache will load it last. You want Apache to behave like normal for all requests and then proxy anything that doesn’t match your other host files to the Pow server.
###A little Pow(der)###
Pow has already made your life better, what more could you want?
and creating a symlink is asking an awful lot of you just to run multiple Rack apps simultaneously with no hassle…
So you use Powder, a handy little gem that lets you link and unlink Pow apps without
leaving the comfort of your
. And hey, it can give you a bit more insight to what Pow’s doing too.
Pow gives you really, really easy setups for your Rack apps. Now you can work on several at the same time or support interaction between them with ease. Coupled with one-line install/uninstall, the barrier to entry is incredibly low too, so give it a shot. It can make your (dev) life simpler.