Ahmed S. Durrani
Ahmed S. Durrani

Reputation: 1585

Merge Request not working GitLab

I have been trying to merge two branches with GitLab But I am keep getting this message. I checked no branch is protected.

You can accept this request automatically. If you still want to do it manually - click here for instructions after this merge request button disables.

Tried bundle exec rake gitlab:app:enable_automerge RAILS_ENV=production

Error:

could not locate Gemfile

Being a total noob to GitLab and Ubuntu I am having hard time understanding this.

githost.log

May 13, 2013 09:59 -> ERROR -> Command failed [1]: /opt/gitorious-2.4.12-1/git/bin/git --git-dir=/opt/gitlab-5.1.0-2/apps/gitlab/gitlab-satellites/testairtdl/.git push origin master

remote: hooks/update:10: undefined method `require_relative' for main:Object (NoMethodError)[K

remote: error: hook declined to update refs/heads/master[K

To /opt/gitlab-5.1.0-2/apps/gitlab/repositories/testairtdl.git

! [remote rejected] master -> master (hook declined)

error: failed to push some refs to '/opt/gitlab-5.1.0-2/apps/gitlab/repositories/testairtdl.git'

Upvotes: 3

Views: 4701

Answers (2)

Adam Birr
Adam Birr

Reputation: 41

If you run the rake command from the GitLab folder, you will not get the could not locate Gemfile

Upvotes: 1

VonC
VonC

Reputation: 1328152

From gitlab-shell/issues/12, you must use the wrong ruby version when executing gitlab.

Even if ruby 1.9.3 is installed, the ruby might not be correct over ssh.

That same issue page includes:

ssh git@blah will try calling whatever is in command= in authenticated_keys without any login/interactive shells, therefore skiping any .*profile/rc files and, as a result, not having rvm loaded and using system ruby which is 1.8.7.

As mentioned in this answer, make sure to include in your .bashrc:

# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 

before

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

Upvotes: 1

Related Questions