Reputation:
I am trying to deploy my application to my server, using Capistrano.
I am in a Git Bash and have committed everything and setup deloy.rb file and remote repo on Github.
Now when I try any cap command, even cap -h
from Git bash, I get this error:
sh.exe": cap: command not found
I am in the correct directory. It seems that Git Bash is not linked to Capistrano.
What do I have to do to call Capistrano?
After spatz' answer, I added the Capistrano directory to the path: C:\InstantRails\ruby\lib\ruby\gems\1.8\gems\capistrano-2.5.8\bin.
Now the error message from cap -h
changed:
/usr/bin/env: ruby: No such file or directory
What am I doing wrong?
Upvotes: 0
Views: 1308
Reputation: 8437
Git Bash, unlike the Windows command prompt, only looks in the PATH environment variable for executables and does not look in the current directory. Either specify the full path to the cap executable (if it is in the current dir then use ./cap
) or add its location to the PATH variable, and you'll be able to run it.
Note that you'll have to close git bash and start it again for the environment variables to be updated after you change them.
For your new error message, make sure ruby
is also in the path.
Upvotes: 2