I remember seeing fixes for something like this, consider trying 7.6 tomorrow.

Best regards,
Sytse Sijbrandij
CEO GitLab B.V.


On Tue, Nov 25, 2014 at 3:29 PM, Daniel Sanabria <[email protected]> wrote:
> Hi,
>
> I have a pre-receive hook that calls puppet parser to check the changes
> before putting them to the master. Everything work ok when pushing from a
> cloned repo but when I try to commit changes on Gitlab's online editor I get
> the following:
>
> To /var/opt/gitlab/git-data/repositories/automation/scm.git
>  ! [remote rejected] production -> production (pre-receive hook declined)
> error: failed to push some refs to
> '/var/opt/gitlab/git-data/repositories/automation/scm.git'
>
> November 25, 2014 14:00 -> ERROR -> Command failed [1]:
> /opt/gitlab/embedded/bin/git
> --git-dir=/var/opt/gitlab/git-data/gitlab-satellites/automation/scm/.git
> push origin production
>
> remote: ud000189
> remote: git
> remote: RubyGems Environment: - RUBYGEMS VERSION: 1.8.24 - RUBY VERSION:
> 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux] - INSTALLATION DIRECTORY:
> /opt/gitlab/embedded/service/gem/ruby/1.9.1 - RUBY EXECUTABLE:
> /opt/gitlab/embedded/bin/ruby - EXECUTABLE DIRECTORY:
> /opt/gitlab/embedded/service/gem/ruby/1.9.1/bin - RUBYGEMS PLATFORMS: - ruby
> - x86_64-linux - GEM PATHS: - /opt/gitlab/embedded/service/gem/ruby/1.9.1 -
> GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark
> => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: -
> http://rubygems.org/
> remote: /opt/gitlab/embedded/lib/ruby/gems/1.9.1
> remote:
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/dsl.rb:33:in
> `eval_gemfile': Gemfile syntax error: (Bundler::GemfileError)
> remote: /opt/gitlab/embedded/service/gitlab-rails/Gemfile:20: syntax error,
> unexpected ':', expecting $end
> remote: gem "mysql2", group: :mysql
> remote:                     ^
> remote:     from
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/dsl.rb:9:in
> `evaluate'
> remote:     from
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/definition.rb:26:in
> `build'
> remote:     from
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:152:in
> `definition'
> remote:     from
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:115:in
> `setup'
> remote:     from
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/setup.rb:17
> To /var/opt/gitlab/git-data/repositories/automation/scm.git
>  ! [remote rejected] production -> production (pre-receive hook declined)
> error: failed to push some refs to
> '/var/opt/gitlab/git-data/repositories/automation/scm.git'
>
>
> What I noticed is that the RubyGems Environment is different if the commit
> is performed on the web ui editor (resulting in the above) and a push to
> origin from the cloned repo (Rubygem env output below)
>
>  RubyGems Environment: - RUBYGEMS VERSION: 1.8.24 - RUBY VERSION: 1.9.3
> (2013-11-22 patchlevel 484) [x86_64-linux] - INSTALLATION DIRECTORY:
> /opt/gitlab/embedded/lib/ruby/gems/1.9.1 - RUBY EXECUTABLE: /opthe reason
> I'm asking is because we have pre-receive git hooks which are using
>                      different gem env values depending on which user/shell
> the hook is executedt/gitlab/embedded/bin/ruby - EXECUTABLE DIRECTORY:
> /opt/gitlab/embedded/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM
> PATHS: - /opt/gitlab/embedded/lib/ruby/gems/1.9.1 - /.gem/ruby/1.9.1 - GEM
> CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark =>
> false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: -
> http://rubygems.org/
>
> Is there anything I can do to force the valid RubyGems Environment when the
> pre-receive hook is ran regardless if changes are commited from the web ui
> or by pushing using an external git client?
>
> Thanks in advance,
>
> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "GitLab" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gitlabhq/b777e395-4d29-420c-906d-3d61bfd41a24%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/CAJTzhG_tvNR5fFep84YS%3DEW1MRJQYudR9n9%2BtZ9Ykt6uCqcvqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to