newbie capistrano rails deployment problem (can't find git in the path) -


i'm using: rails 3, ruby 1.9.2 , trying deploy using capistrano. when run cap deploy:check, capistrano tells me can't find git on deployment server (see below).

any thoughts on i'm doing wrong??

here's setup.

  • i have git repo @ github
  • i have laptop updated local copy of github repo
  • i have local "production" server (192.168.0.103) production app should deployed
  • i'm running commands local repo on laptop (not production server)

if run cap deploy:setup, deploy.rb file adds "releases" , "shared" directories on production server (aka 192.168.0.103).

if run cap deploy:check command, fails error message of `git' not found in path (192.168.0.103).

what strange (to me @ least) git installed on 192.168.0.103 , command that's used see if git there (which git) works when ssh 192.168.0.103.

so, i'm doing wrong (maybe in deploy.rb file?)

here's sanitized version of deploy.rb file

default_run_options[:pty] = true set :application, "myapp" set :repository,  "git@github.com:xxxxxxx/myapp.git" set :user, "abcde" #username that's used ssh 192.168.0.103 set :scm, :git set :scm_passphrase, "xxxxxxxx"  set :branch, "master" set :deploy_via, :remote_cache set :deploy_to, "/users/abcde/www"  role :web, "192.168.0.103" role :app, "192.168.0.103" 

here's output of cap deploy:check

  * executing `deploy:check'   * executing "test -d /users/abcde/www/releases"     servers: ["192.168.0.103"] password:      [192.168.0.103] executing command     command finished   * executing "test -w /users/abcde/www"     servers: ["192.168.0.103"]     [192.168.0.103] executing command     command finished   * executing "test -w /users/abcde/www/releases"     servers: ["192.168.0.103"]     [192.168.0.103] executing command     command finished   * executing "which git"     servers: ["192.168.0.103"]     [192.168.0.103] executing command     command finished following dependencies failed. please check them , try again: --> `git' not found in path (192.168.0.103) 

okay, think figured out.

i having same problem described here: http://groups.google.com/group/capistrano/browse_thread/thread/50af1daed0b7a393

here's choice excerpt:

i try deploy application on shared environment on installed git. have added path bashrc, but work in interactive bash. when cap logging in, not running bash. if run deploy:check fails --> `git' not found in path (example.com) if set :scm_command, "/home/user/opt/bin/git" problem solved deploy:check command, when run deploy:cold, fails because tries run /home/user/opt/bin/git locally , can't put git in there, because use windows on pc.

adding :scm_command, "path/to/my/git" fixed issue, although i'm not 100% correct approach take.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -