It looks like guard-jasmine is running with Ruby 1.8.7, even if the RVM gem path contains ruby-2.0.0-p0. When using the new Ruby 1.9 Hash syntax in Ruby 1.8, the error odd number list for Hash (SyntaxError)
is thrown.
You need to either
- Make sure the Git pre-commit-hook is using at least Ruby 1.9
- Use Guard::Jasmine version 1.14.0, which runs fine on Ruby 1.8
Since Ruby 1.8.7 is end-of-life anyway, I'd suggest to try to initialize RVM in the pre-commit-hook:
#!/bin/sh
cd web
source "$HOME/.rvm/scripts/rvm"
rvm reload > /dev/null
bundle exec guard-jasmine
This implies you've set a default Ruby version
$ rvm --default use 1.9.2