Mongrel in development

A newbie Q here...

In the default leopard env. Is mongrel serving dev rails apps without
sitting behind apache?
In know on a production env apache or nginx etc. Is a required part of
the stack. The reason I ask is, when I shut down apache on my dev
machine script/server still works.

Any insight on this?

Thanks, Elliott

script/server starts a single process (mongrel, webrick etc) which you
connect to directly. You don't need to have apache, nginx or any other
webserver running.

I moved away from script/server when passenger made it so easy to develop
using apache, but you can stick with script/server as long as you like.
Whatever is easier in your situation.


Matt Harrison

Thanks Matt.

That clears some things up for me. I didn't realize Mongrel could
stand alone. I am actually trying to switch over to Passenger as that
will be my new Production env. and I want to develop in a similar
env.. I am having some issues getting Passenger running though cause
of some system issues on my machine.

What's your thoughts on running Mongrel on my dev box and Passenger in

Thanks man.

Mongrel used to be very popular before passenger came along. You could run
many mongrel processes on different ports, then have apache or another
webserver/load balancer route the requests to them. This made the
applications multi-threaded.

Now a lot of people use passenger which requires less maintenance and setup,
and does pretty much the same thing quietly.

As for your last question...I'm not an expert but I'm guessing that you
might one day run into a problem on passenger that didn't happen on mongrel
in development (or vice versa). Ideally I think you should be using the same
software on both dev and prod, but that's maybe just me.

I think it depends a lot on your applications, if you are using complex gems
or features, then developing on different server software might cause you
problems when you deploy to production.

These are just how I see things, others may well have different views.

Matt Harrison

I hear you on that. Thanks for your time!


Marnen Laibow-Koser wrote:

Elliott Golden wrote:

What's your thoughts on running Mongrel on my dev box and Passenger in

That's what I do. It hasn't been a problem at all. I don't really see
much point in putting Passenger on my laptop.

Same here. I use mongrel for development mostly because I don't
generally run Apache at all on my development box. I don't see the point
of having Apache/Passenger running all the time just to run my Rails

This is pretty much all about user preference, so do whatever you find
works for you. I just try to run as few services on my development
machine as possible and Apache is not generally requires. I don't browse
web sites stored on my own laptop. I figure the fewer services I have
running, the more secure my environment is for day-to-day use. Not that
I'm concerned about the security of Apache.

That being said, I'm sure there are some advantages of running
Apache/Passenger on your development box, but I don't think application
server differences are going to be a major issue. I would expect to have
more issues in production, but due to load rather than what application
server is used.

Matt Harrison wrote:

Ideally I think you should be using the
same software on both dev and prod, but that's maybe just me.

While I see some merit to this, there is actually some advantage to
having different environments for development and production.

1. I happen to develop on a Mac, which provides me with a lot of design
tools, and an excellent development environment that I find advantageous
over other alternatives. However, I generally deploy to Linux servers.

2. Having different environments helps to ensure that I'm not creating
issues that might bind me to a specific deployment environment. I even
tend to use a different database in development than what I use in
production. This helps ensure that the code I write is database

I do think that a staging server that matches your production
environment would be very useful for critical web sites.