Is there any advantage to using WEBrick in development mode for Rails?
I develop on a Mac, and I'm pretty comfortable setting up an Ubuntu VM with Apache installed, so "you don't need to install Apache" is not really a reason. I run Ruby from the VM anyway, so there doesn't seem to be much difference in system resources needed.
In my head, the advantage of using Apache is that it's going to perform more consis开发者_如何学Pythontently with my production server.
So what reasons are there to use WEBrick? Does it make development easier somehow?
No there are no advantages. The only "advantage" is that it is the pre-bundled webserver so you at least "have something"
I'm sure most experienced Ruby devs use something else like thin, mongrel, unicorn, pow, passenger, etc...
I'd go for phusion passenger + passsenger pref pane: http://www.fngtps.com/2008/06/putting-the-pane-back-into-deployment
Awesomeness. This way I can act more like the production server and take it easy when adding new projects etc.
I've been using Rails for a school project, and I find the colorized logs helpful when I'm trying to figure out what the server is doing. Sure you could tail -f
the apache logs, but color is nice IMO.
精彩评论