使用bundle运行gitlab服务器:找不到命令错误 [英] Run gitlab server with bundle: command not found error

查看:395
本文介绍了使用bundle运行gitlab服务器:找不到命令错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道发生了什么事

sudo服务gitlab启动

sudo service gitlab start

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

检查我的系统信息

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

推荐答案

当前在问题6019 ,并且尚未确定解决方案.

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........

启动时,您会看到:

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


问题6019现在包括此评论:

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

在阅读之后,我已经解决了此问题本指南.
Gitlab服务按预期执行...

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

使用GitLab 6.7.2仍然不够用

Still not enough though, with a GitLab 6.7.2

现在,该问题包括来自Terry Wang的消息:

That issue now includes the message from Terry Wang:

升级到6.8.x后,我遇到了完全相同的问题.后来我发现这是初始化脚本.

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

Ruby是通过rbenv + ruby-build安装的,看起来gitlab初始化脚本无法

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

解决方法

  1. 在gitlab初始化脚本的PATH中添加$HOME/.rbenv/shims

或简单地为/usr/local/bin中(或任何适当的情况下)如下所示的包创建符号链接,而无需进行任何更改

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

su-git ln -s $(捆绑)/usr/local/bin

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

希望rbenv支持将很快添加.


亚历山大·亚当(Alexander Adam)在5月又添加了


Alexander Adam added back in May:

我有同样的问题.
但是在我的情况下,我为gitlab用户使用了本地rbenv-installation,因此我必须添加PATH=/home/$app_user/.rbenv/bin:/home/$app_user/.rbenv/shims:$PATH,以便init脚本将使用rbenv-bins.

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.

这篇关于使用bundle运行gitlab服务器:找不到命令错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆