# Mongrel in development

**URL:** <https://www.ruby-forum.com/t/mongrel-in-development/174031>\
**Category:** Rails\
**Created:** [August 19, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031 "2009-08-19T18:05:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/1 "2009-08-19T18:05:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/2 "2009-08-19T19:25:34Z")

</div>

On Wed, Aug 19, 2009 at 09:04:52AM -0700, elliottg wrote:

> 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.

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.

HTH

Matt H.

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/3 "2009-08-19T19:32:01Z")

</div>

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  
production?

Thanks man.

On Aug 19, 1:22 pm, Matt H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 7:51pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/4 "2009-08-19T19:51:56Z")

</div>

I hear you on that. Thanks for your time!

EG

On Aug 19, 1:38 pm, Matt H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/5 "2009-08-19T19:39:38Z")

</div>

On Wed, Aug 19, 2009 at 10:29:57AM -0700, elliottg wrote:

> production?  
> 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 H.

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/6 "2009-08-19T20:02:39Z")

</div>

Elliott G. wrote:  
[…]

> What’s your thoughts on running Mongrel on my dev box and Passenger in  
> production?

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.

Maybe if I had a computer that I used only for Web development (for  
example, if I had an office job), things would be different. But I just  
don’t see much advantage, since Passenger doesn’t appear to mess with  
the apps it serves.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [August 19, 2009, 8:43pm UTC](https://www.ruby-forum.com/t/mongrel-in-development/174031/7 "2009-08-19T20:43:50Z")

</div>

Marnen Laibow-Koser wrote:

> Elliott G. wrote:  
> […]
> 
> > What’s your thoughts on running Mongrel on my dev box and Passenger in  
> > production?
> 
> 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  
apps.

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 H. 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  
agnostic.

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

On Wed, Aug 19, 2009 at 09:04:52AM -0700, elliottg wrote:

> In know on a production env apache or nginx etc. Is a required part of  
> the stack.

Actually, this is not entirely true, but it might as well be. You could  
very well run a production application directly with Mongrel, or Thin or  
whatever. This would be rather silly, but it’s certainly possible if the  
traffic is low enough.
