scm_command

489 views
Skip to first unread message

Andrei

unread,
Apr 1, 2009, 9:47:39 AM4/1/09
to Capistrano
I try to deploy an application on a shared environment on which I
installed git. I have added the path to bashrc, but this would work
only in an interactive bash. When cap is logging in, it will not be
running bash.
If I run deploy:check it fails by
--> `git' could not be found in the path (example.com)
If i set :scm_command, "/home/user/opt/bin/git" the problem is solved
with the deploy:check command, but when I run deploy:cold, it fails
because it tries to run /home/user/opt/bin/git locally and I can't
even put git in there, because I use windows on my pc.
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "/home/alfaimca/opt/bin/git ls-remote
alfa...@alfaimcadastru.com:public_html/alfaim/alfaim.git master"
*** [deploy:update_code] rolling back
* executing "rm -rf etc/rails_apps/alfaim/releases/20090401133001;
true"
servers: ["alfaimcadastru.com"]
[alfaimcadastru.com] executing command
command finished
C:/RubyStack/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/
capistrano/recipes/deploy.rb:97:in``': No such file or directory - /
home/alfaimca/opt/bin/git ls-remote
alfa...@alfaimcadastru.com:public_html/alfaim/alfaim.git master
(Errno::ENOENT)
If I don't set scm_command deploy:cold fails anyway, because it runs
git commands locally and remote, and the paths are different.
I tried to solve this by myself, but I just ended up hating myself.
So, wouldn't be a good idea if capistrano would have instead of
scm_command, scm_local_command and scm_remote_command?

Jamis Buck

unread,
Apr 1, 2009, 9:59:14 AM4/1/09
to capis...@googlegroups.com
You can actually already do that, Andrei:

set :scm_command, "/opt/local/bin/git"
set :local_scm_command, "git"

- Jamis

Andrei Mirt

unread,
Apr 1, 2009, 10:05:42 AM4/1/09
to capis...@googlegroups.com
Thank you very much, and I'm sorry I didn't find this option before posting, but I was really stuck on this for 4 days and I really searched for a solution during this time.
Reply all
Reply to author
Forward
0 new messages