【发布时间】:2013-08-24 14:57:02
【问题描述】:
我已按照说明安装 GitLab 6.0.0:https://github.com/gitlabhq/gitlabhq/blob/6-0-stable/doc/install/installation.md
当我进入“检查应用程序状态”并运行时
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
我看到“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 和 sudo -u git -H bundle --version 都显示 1.3.5,所以我不确定为什么上面的命令显示“未知”...
...所以我继续运行sudo service gitlab start,它显示“GitLab 服务已启动”,但似乎并非如此,因为sudo service gitlab status 说“GitLab 服务未运行”和@ 987654330@ 为空但具有权限:用户和组“git”的“drwxr-xr-x”。
axilleas 通过创建目录设法解决了这个问题,但这不是我的问题。
...我可能不应该期望它从这里开始工作,但我还是继续,但现在它在抱怨 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 遇到过这个问题(但他的捆绑器工作正常)。他听从了建议,但由于某种原因,他的日志文件比我的信息多得多——我的只有一行:
nohup: 运行命令失败`bundle': 没有这样的文件或目录
...可能与“No such file or directory - bundle exec rake db:migrate:status”行有关?
不,我认为可以忽略它吗? - 这行得通:sudo -u git -H bundle exec rake db:migrate:status RAILS_ENV=production
编辑:
当我运行echo $PATH 时,我看到/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games。
我在 lib/tasks/gitlab/info.rake 添加了一些日志记录,结果发现 gitlab 使用了不同的路径:
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin:/usr/bin:/bin:/usr/sbin:/sbin
捆绑安装在/usr/local/bin
【问题讨论】:
-
当我运行
bundle --version我看到Bundler version 1.3.5 -
当我运行
echo $PATH时,我看到了/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games。 bundle 安装在/usr/local/bin我已经添加了一些日志到 lib/tasks/gitlab/info.rake ,结果 gitlab 使用了不同的路径:/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin:/usr/bin:/bin:/usr/sbin:/sbin