On Mon, 2006-01-23 at 02:42 +0900, Jeff Pritchard wrote:
> Noob question here.
> 
> No intent to impugn Zed's mad skilz or the need for something like 
> Mongrel.  I'm just confused by why it would be common to develop or 
> deploy a ruby on rails app with something other than production servers 
> like Apache.
> 
> So far, all of the rails demos I have seen are using webrick.  This has 
> been true even for setups like macosx that come with apache already set 
> up and running.
> 
> Does apache not come standard with everything needed to serve a rails 
> app?  If not, is there an add-on module for apache that makes it 
> rails-savvy?
> 
> Or is it the case that all rails apps have to be served by a special 
> rails server like mongrel or webrick?

Rails can be run through flat CGI with Apache, but that's really slow
because *every single time* you make a request, the code has to be
reloaded into memory from disk. The step up from this is something like
FastCGI, or SCGI which will keep the code in memory between requests.
The performance is then WAY better, but in development changes you make
to the code won't work until you reload the server. Obviously that's no
good so WEBrick is a lightweight server intended for development use,
which will just reload the parts of the code you change between
requests. It's not recommended for deployment though because it isn't
fast enough.

This is a very good article to read:
http://duncandavidson.com/essay/2005/12/railsdeployment

Hope that helps

Jon

-- 
Jonathan Leighton
http://turnipspatch.com/ | http://jonathanleighton.com/ | http://digital-proof.org/