J Scott Smith

Running Bundle Exec Within a Git Hook

Notes - January 14th, 2015
#!/bin/bash -l

cd /var/www/project/
bundle exec grunt build

The -l parameter executes the command in a login shell, which means that it inherits your path and other settings from your shell profile.

I’ve managed to use this to compile my scss with Grunt on my VPS using Bundler.

More information about shell login https://rvm.io/support/faq#shell_login