Testing Mongrel Configuration

Don't write your own config file by hand, use the -G option to Mongrel so that it gets generated correctly. You can then modify it from there. You do it like this:

mongrel_rails start -G test.config -e production ...

(where ... is any other options you need)

It'll then tell you it created test.config and you just need to run it with:

mongrel_rails start -C test.config

And that's it.

I tried creating the config file as you suggested. I think something else may be broken:

wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production
!!! Path to log file not valid: log/mongrel.log

start reported an error. Use mongrel_rails start -h to get help.

Are you calling this from within a Rails application’s root (doesn’t look like it)? You should be.

Matt

I then tried the following:

wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production -l /home/wgant/mongrel.log
!!! Path to pid file not valid: log/mongrel.pid
start reported an error. Use mongrel_rails start -h to get help.

wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production -l /home/wgant/mongrel.log -p /home/wgant/mongrel.pid
!!! Path to pid file not valid: log/mongrel.pid
start reported an error. Use mongrel_rails start -h to get help.

wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production -l /home/wgant/mongrel.log -P
/home/wgant/mongrel.pid
!!! Path to docroot not valid: public
start reported an error. Use mongrel_rails start -h to get help.

By the way, are you “the” Zed that wrote Mongrel?

He answers to many names. “Zed” is one of them.