使用Gitlab的Ruby Gems没有这样的文件加载 - rb-inotify

时间:2012-10-23 14:20:19

标签: ruby gem bundler gitolite gitlab

我正在使用Gitlab,我正在尝试按照这些说明将我的gitolite v2升级到v3:

“如果在2.9.x中出现此问题,则应重新安装gitolite。

1)备份所有存储库。只需在其他地方复制/ home / git / repositories / *。

2)安装新的gitolite。见https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md

3)复制存储库。

4)sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_keys&& sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_repos

就是这样。

这些步骤也与想要将gitolite v2更新为v3“

的用户有关

我的Gemfile和Gemfile.lock中包含rb-inotify,如下所示:

gitlabhq@build:~/gitlabhq$ grep notify Gemfile
gem 'rb-inotify', :require => linux_only('rb-inotify')
gitlabhq@build:~/gitlabhq$ grep notify Gemfile.lock
rb-inotify (0.8.8)
rb-inotify

我正在尝试使用以下命令更新我的密钥和repos,但我总是收到错误“没有这样的文件要加载--rb-inotify

gitlabhq@geminibuild:~/gitlabhq$ sudo -u gitlabhq -H bundle exec rake gitlab:gitolite:update_keys
rake aborted!
no such file to load -- rb-inotify
(See full trace by running task with --trace)

我尝试进行捆绑安装,“使用”列表中不包含rb-notify gem。

我试过像这样安装rb-inotify gem:

sudo -u gitlabhq gem install rb-inotify

我擦除了Gemfile.lock文件,然后运行:

sudo -u gitlabhq bundle install

仍然没有运气。

如何让Gitlab识别并使用rb-inotify。谢谢 -

2 个答案:

答案 0 :(得分:19)

认识到这有点老了,我以为我会为后代留下一些东西。为了使这些调用工作,你只需要附加:

RAILS_ENV=production

到你的命令。这在“Gitlab”部分的trouble shooting guide中列出。

答案 1 :(得分:5)

我似乎已经通过运行修复了它:

bundle install --without production
bundle install