Problem with pre-receive hook


I’m using a custom pre-receive hook, I’m running into a strange issue. For my user account the hooks work fine. When my co-worker tries to push to the repository it fails.

remote: [31m/home/git/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem’: puppet is not part of the bundle. Add it to Gemfile. (Gem::LoadError)

I’m new to ruby in general so I’m not sure what this error means.

I configured the script to use the gitlab user /home directory and path. I installed the puppet and puppet-lint gems and made sure they are accessible to the gitlab user. I can run puppet and puppet-lint on the command line as the gitlab user.

That’s what really has me confused. If I can run the commands fine as the gitlab user account via a shell why do the commands not run when a Gitlab user pushes to the repository, triggering the pre-receive hook?