Use an executable file for a hook, not a ruby one that uses the hook API. Except that the file is not actually executable, so it should not be run.