Mongrel pid error fixed

I am BRAND SPANKIN NEW to mongrel and for a few days i could not figure out what an error was I was getting.

I have been setting up my mongrel to run off a config file so I would run this command from my rails app top level directory:

mongrel_rails start -G config/mongrel_production.yml -e production -p 8000 -d -l log/mongrel.log

and then I would start the mongrel with:

mongrel_rails start -C config/mongrel_production.yml

The first line above creates a file in config/ called mongrel_production.yml, it would set the port to 8000, the log file to log/mongrel.log, the mongrel to be a daemon process (running in the background), and would set it to production mode. The next line starts the mongrel.

Well the error I was getting happened when I wanted to stop the mongrel process:

mongrel_rails stop

the error would be:

!!! PID file log/mongrel.pid does not exist. Not running?
stop reported an error. Use mongrel_rails stop -h to get help.

I ended up communicating with Zed Shaw (who, from what i can tell is the creator of mongrel) and he said that they had some problems with the paths in version 0.3.13.3 and he recommended for me to use the latest pre-release of mongrel (which as of right now is 0.3.13.4). He told me to use this command to get the latest via gem:

gem install mongrel --source=http://mongrel.rubyforge.org/releases/

and what do you know? It worked!! now i can stop my mongrels with:

mongrel_rails stop


About this entry