I have no idea what happened

sudo service gitlab start

Starting both the GitLab Unicorn and Sidekiqscript/web: line 21: bundle: command not found
......

Check my system information

System information
System:     Ubuntu 12.04
Current User:   git
Using RVM:  yes
RVM Version:    1.25.19
Ruby Version:   1.9.3p545
Gem Version:    2.2.2
Bundler Version:1.5.3
Rake Version:   10.1.1

GitLab information
Version:    6.6.4
Revision:   42e34ae
Directory:  /home/git/gitlab
DB Adapter: postgresql
URL:        http://localhost:1680
HTTP Clone URL: http://localhost:1680/some-project.git
SSH Clone URL:  git@localhost:some-project.git
Using LDAP: no
Using Omniauth: no

GitLab Shell
Version:    1.8.0
Repositories:   /home/git/repositories/
Hooks:      /home/git/gitlab-shell/hooks/
Git:        /usr/bin/git
有帮助吗?

解决方案

This is currently followed in issue 6019, and has no definitive resolution yet.

It also occurs on a reboot, where the server hangs with an increasing number of dots after:

Shutting down both Unicorn and Sidekiq........

On startup, you can see:

Removing stale Sidekiq web server pid. This is most likely caused by the Sidekiq crashing the last time it ran.

The issue 6019 includes now this comment:

rvmsudo -u git bundle exec unicorn_rails -c config/unicorn.rb -E production -D

I've solved this issue after read this guide.
Gitlab service is executed as you expect...

Still not enough though, with a GitLab 6.7.2


That issue now includes the message from Terry Wang:

I had exactly the same problem after upgrading to 6.8.x. Later on I figure out that it was the init script.

Ruby is installed via rbenv + ruby-build, looks like the gitlab init script is NOT able to

Workaround

  1. add $HOME/.rbenv/shims to PATH in the gitlab init script

  2. OR simply create a symbolic link for bundle in /usr/local/bin (or whatever appropriate) like below without changing anything

    su - git ln -s $(which bundle) /usr/local/bin

Hope rbenv support will be added soon.


Alexander Adam added back in May:

I have the same problem.
But in my case I used a local rbenv-installation for the gitlab user so I had to add PATH=/home/$app_user/.rbenv/bin:/home/$app_user/.rbenv/shims:$PATH so that the init-script will use the rbenv-bins.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top