Re: Testing Mongrel Configuration

Tom Mornini
Fri, 13 Oct 2006 16:47:25 -0000

On Oct 13, 2006, at 8:03 AM, Will Gant wrote:

> I''m trying to get mongrel set up under Apache, but first
I''d like
> to test Mongrel to make sure it is set up correctly (before going
> through all the trouble with Apache).
>
> I''ve done the following so far:
> 1) Installed Mongrel
> 2) Set up a Rails site called test
> 3) Added a file called test.config to my /etc/mongrel/sites-
> enabled/ directory.
> 4) Started Mongrel
>
> I then did the following to start Mongrel
> sudo /etc/init.d/mongrel start test
>
> And received the following error message:
> line 43: /etc/mongrel/sites-enabled/test: No such file or directory
>
> Here are the contents of my /etc/mongrel/sites-enabled/test.config
> file:
> #RAILS_ROOT of your application
> dir=/home/wgant/Desktop/test
> #port the first mongrel instance should listen to, additional
> instances listen to ports above
> port=8100
> #number of instances
> servers=3
> #port pen will listen on
> proxy_port=8001

You seem to be trying to use mongrel_cluster, not mongrel per-se...

To debug, skip the init.d script and try starting directly:

   mongrel_rails cluster::start -c /etc/mongrel/sites-enabled/
test.config

At Engine Yard, we use a very simple mongrel_cluster.yml file:

cwd: /part/to/rails/root
environment: production
port: 5000
servers: 3

I think it''s interesting that your config file uses
''dir:'' where ours
uses ''cwd:''. I don''t use pen, but I find it
fascinating that pen
configuration is in the mongrel_cluster config file, but perhaps that''s
correct.

--
-- Tom Mornini, CTO
-- Engine Yard, Ruby on Rails Hosting
-- Reliability, Ease of Use, Scalability
-- (866) 518-YARD (9273)