Starting mongrel with a custom command line argument
- by whaka
I would like to be able to start a mongrel or webrick server by passing an extra command line argument that I can read somewhere inside my rails application. An example would be:
ruby script/server -p3000 --target=FOO
Here, --target is a custom switch who's value I would like to intercept in my rails application.
However, this yields the error:
server: invalid option: --target=FOO
I found mongrel documentation which mentions a -C (--config=PATH) argument specifying a full path to a yml configuration file, but specifying that switch gives the same error as above. I presume this option is deprecated.
Is there another way to accomplish this?