09 April 2008

mongrel_rails, ssh, and capistrano

Nothing was working. "command not found: mongrel_rails" - how could this be? It turns out that capistrano uses a non-interactive ssh session, which means the remote user doesn't get the usual environment, but rather some system default, which, as you have guessed, in my case today, doesn't include /opt/local/bin (or wherever you keep your mongrel_rails). Some commenters (eg http://www.ruby-forum.com/topic/79248) suggest tweaking the ssh and sshd configuration - but I cheated and made a smybolic link from /usr/bin/mongrel_rails to /opt/local/bin/mongrel_rails. Much simpler. At least now the error message is gone. I've still a lot of capistranoing to do though ...

No comments:

Post a Comment