I\'m using capistrano, capistrano/rbenv, capistrano/bundler and capistrano/rails. I get this error in the step where capistrano compiles the assets:
DEBUG [49a50
I think you should execute
apt-get install git-core
at your server
I was facing the same error.After trying hard to resolve it, i remembered that i have removed few packages randomly from my server where i was deploying the code.
So i also removed git accidently.Running sudo apt-get install git
fixed it .
I had the same problem using rbenv. What solved it for me was including the rbenv library before bundler--not after it. The order turned out to be important. Here's what's in my Capfile:
require 'capistrano/rbenv'
require 'capistrano/bundler'
If you did it right you should see the bundle command executed with the rbenv prefix, along these lines:
XX RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.3.0 $HOME/.rbenv/bin/rbenv exec bundle install ...
Solution to ERROR:
/usr/bin/env git no such file or directory capistrano
Install git in remote server, machine to which deployment is to be done.
apt-get install git
When I typed bundle install
interactively on a Terminal, it worked. Now, when I use it through Capistrano, it doesn't work.
I solved it this way:
In Ubuntu, there is a block of code in your ~/.bashrc
that says:
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
When you run Capistrano, it will actually use your ~/.bashrc
but it will not run any command below that block of code.
So, I fixed the problem moving the lines of code that were required by bundle install
above that block of code, so Capistrano could load them.
You could get a hint of which lines to move by running which bundle
.
Make sure you are requiring all of these gems in your Capfile.