If you use git-deploy with rvm and if you face the error /usr/bin/env: ruby: No such file or directory then here is the quick fix that you can try.
add the lines
to the file deploy/after_push before the run() function.
If you still the error then you can try to add the lines
If you are using rbenv then you can add
Note: make sure your deploy is an username in server for your deployments