I\'m using RVM. I wrote a Git pre-commit hook for a project:
#!/usr/bin/env ruby
puts RUBY_VERSION
puts `echo $PATH`
exit(1)
you need to set ruby to a wrapper:
#!$rvm_path/wrappers/ruby-2.0.0-p195/ruby
You can simplify it with an alias:
rvm alias create git_hooks 2.0.0-p195
And then the ne shebang will look like this:
#!$rvm_path/wrappers/git_hooks/ruby
In the file just make sure to replace $rvm_path with /Users/mgoerlich/.rvm so finally it looks like:
#!/Users/mgoerlich/.rvm/wrappers/git_hooks/ruby