Topic: Mongrel yaml configuration?

Hi guys,

Me again with a question about Mongrel.. I've been using it to serve some of my webpages (with mixed success) but now I'm trying to move the commandline options into a config file.. Here's what I did.

First I tried to start mongrel from my home dir rather than the application root, which worked:

mongrel_rails start -c [path] -d -p 8001

Then I stopped mongrel again and repeated that line and added the -G option to save the config file:
mongrel_rails start -c [path] -d -p 8001 -G ~/config.yml

But now when I try to start the mongrel server from my home dir it doesn't seem to change its starting directory properly.. Here's what happens:
~$ mongrel_rails start -C config.yml
!!! Path to log file not valid: log/mongrel.log
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get help.

Ofcourse [path]/log does exist. Does this mean the change dir option doesn't work when using a config file? Do I have to manually cd to each application root and start mongrel?

Here's the config file itself, I didn't modify it from what mongrel auto-generated:

- mongrel
:timeout: 0
:log_file: log/mongrel.log
:pid_file: log/
:num_processors: 1024
:docroot: public
:port: "8001"
:daemon: true
:environment: development
:debug: false
:cwd: [path]

-- marsvin

Re: Mongrel yaml configuration?

When you specified the path the first time (-c) mongrel set up the config relative to that directory.  So it expects that directory every time when it starts.

I think you can fix this simply by prepending your [path] to the log_file and pid_file in the config.

Re: Mongrel yaml configuration?

Ah I was hoping I could keep those relative..

I did try starting with the config file from the same directory I was in when I made the config but no luck.

Doesn't matter to much I suppose, I can just keep using the commandline options.