2

I have followed the instructions to install GitLab 6.0.0: https://github.com/gitlabhq/gitlabhq/blob/6-0-stable/doc/install/installation.md

When I get to "Check Application Status" and run

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

I see "Bundler Version:unknown":

System information
System:         Ubuntu 12.04
Current User:   git
Using RVM:      no
Ruby Version:   1.9.3p0
Gem Version:    1.8.11
Bundler Version:unknown
Rake Version:   10.1.0

GitLab information
Version:        6.0.0
Revision:       5246d63
Directory:      /home/git/gitlab
DB Adapter:     mysql2
URL:            http://my-server
HTTP Clone URL: http://my-server/some-project.git
SSH Clone URL:  git@my-server:some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        1.7.0
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

bundle --version and sudo -u git -H bundle --version both show 1.3.5, so I'm not sure why it's showing "unknown" for the command above...

...so I proceed and run sudo service gitlab start and it says "GitLab service started", but it seems that's not true as sudo service gitlab status says "GitLab service is not running" and /home/git/gitlab/tmp/pids is empty but has permissions: "drwxr-xr-x" for user and group "git".

axilleas managed to get past this by creating the directory, but that's not my issue.

...I probably shouldn't expect it to work from here, but I proceed anyway, but now it's complaining about sidekiq:

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.0 ? ... OK (1.7.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... can't check, you have no projects

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... no
  Try fixing it:
  sudo -u git -H bundle exec rake sidekiq:start RAILS_ENV=production
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  see log/sidekiq.log for possible errors
  Please fix the error above and rerun the checks.

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... /home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake: No such file or directory - bundle exec rake db:migrate:status
yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.3)

Checking GitLab ... Finished

adril Has experienced this problem (but his bundler is working properly). He follows the advice but for some reason his log file has a lot more info than mine - mine just has a single line:

nohup: failed to run command `bundle': No such file or directory

...maybe it's got to do with the line "No such file or directory - bundle exec rake db:migrate:status"?

No, I think that one is safe to ignore? - this works okay: sudo -u git -H bundle exec rake db:migrate:status RAILS_ENV=production

Edit: When I run echo $PATH I see /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games.

I've added some logging to lib/tasks/gitlab/info.rake and it turns out that gitlab is using a different path:

/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin:/usr/bin:/bin:/usr/sbin:/sbin

bundle is installed at /usr/local/bin

Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56
  • When I run `bundle --version` I see `Bundler version 1.3.5` – Nicholas Albion Aug 23 '13 at 01:07
  • When I run `echo $PATH` I see `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games`. bundle is installed at `/usr/local/bin` I've added some logging to lib/tasks/gitlab/info.rake and it turns out that gitlab is using a different path: `/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin:/usr/bin:/bin:/usr/sbin:/sbin` – Nicholas Albion Aug 23 '13 at 01:16

4 Answers4

2

I'm not sure why the problem exists, nor how to fix it in the code, but there's a simple work around:

sudo ln -s /usr/local/bin/bundle /usr/bin/bundle
Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56
0

Can you try to run the failing commands within git user? I mean:

su
su - git
cd gitlab/
run commands..

Maybe sudo is changing your path like described here. So if I were you, I would try to install bundler again and then check the above answers (if this is your case).

Community
  • 1
  • 1
axil
  • 797
  • 2
  • 7
  • 15
  • I think one of the scripts is changing the path. I created a symlink in the path that GitLab is looking in to point to the actual location of bundler and it all seems to be working now – Nicholas Albion Aug 25 '13 at 23:38
  • @NicholasAlbion: That'd be nice if you could post your fix as an Answer and tag it as being tha answer to your question... – MensSana Sep 03 '13 at 18:28
0

visudo
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin

Leslie
  • 1
0

I know this is old, but i'm gonna add some info, as I have a gitlab running on FreeBSD and I had to change several things. Maybe this will be useful for anybody looking for a solution, as I did.

For me Sidekiq problem was caused by wrong command in check.rake. The script uses ps ux, which will trim the output if it's too long. The script (in my current version) was checking it via regex, and my ps shows the process as "ruby20: sidekiq 2.x.x", with ps ux output being cut around sidekiq. This would be triggered also on Linux. Solution - add "w" argument to ps, like:

 Gitlab::Popen.popen(%W(ps wux)

Init script check will fail if you have it installed in a different directory, e.g. I have it as /usr/local/etc/rc.d/gitlab. There is a script_path entry for omnibus, and non-omnibus.

minus
  • 1
  • 1