【发布时间】:2014-04-22 19:31:38
【问题描述】:
为什么使用sudo时找不到命令“bundle”:
[root@desktop gitlab]# sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
sudo: bundle: command not found
[root@desktop gitlab]#
但在不使用 sudo 时确实存在:
[root@desktop gitlab]# bundle exec rake gitlab:setup RAILS_ENV=production
Warning
You are running as user root, we hope you know what you are doing.
Things may work/fail for the wrong reasons.
For correct results you should run this as user git.
This will create the necessary database tables and seed the database.
You will lose any previous data stored in the database.
Do you want to continue (yes/no)? no
Quitting...
[root@desktop gitlab]#
我问的原因是我关注https://github.com/gitlabhq/gitlab-recipes/tree/master/install/centos,并且它声明使用 sudo。
我尝试按照Using $ sudo bundle exec ... raises 'bundle: command not found' error 的说明添加-i 标志,但得到“此帐户当前不可用。”。
【问题讨论】:
-
我最近在 Gentoo 机器上安装了 Gitlab,发现 git 用户需要有效的 shell 和主目录才能成功安装。显然,Gitlab 源代码上有一个提交已过时,但它还不是已发布的 Gitlab 版本的一部分。
-
我有完全相同的问题,除了我在安装 gem 的命令上遇到错误:'sudo -u git -H bundle install --deployment --without development test mysql aws' .我正在运行 Ubuntu 12.04 服务器。
标签: ruby linux rubygems bundler sudo