mongrel_rails restart failures

11 Jun 2007

I was having trouble with Capistrano when deploying thenewsroom to our servers; the deployment would be fine but then the Mongrel cluster restart would fail. This wasn't a huge deal since I could ssh in and restart the cluster manually, but it was annoying. And "annoying" ain't the Capistrano way.

So I Googled around a bit and figured out that it's an sshd thing. When Capistrano connects to the servers over ssh and tries to run the mongrel_rails script, it can only look in directories which have been built into sshd - like /usr/bin and /usr/local/bin. I could have rebuilt sshd to include our mongrel_rails location, but that would have been an incredible pain. So I just symlinked /usr/bin/mongrel_rails to my mongrel_rails location and Bob's your uncle. Painless deployments, back in effect!