Passenger/ngnix, Rack application could not be started: No such file or directory - git ls-files
I am trying to setup a Passenger development environment for my rails apps开发者_如何学C, my app uses a git gem and I having some issues with passenger, bundler and git:
Error message:
No such file or directory - git ls-files
Exception class:
Errno::ENOENT
I have git installed using Homebrew, I tried vendoring my gems but didn't work. My guess is that nginx/passenger is not finding the git binary.
You need to ensure that your Ruby process (ie. your Passenger process) has a workable $PATH
. However, this may be difficult and is definitely a security vulnerability. I could get your app to run anything as root by putting a git
script in your path before the real git
executable. So, better than relying on $PATH, use the full path of git, which is probably something like /opt/local/bin/git
.
精彩评论