Ruby Gems with Gitlab no such file to load — rb-inotify

拜拜、爱过 提交于 2019-12-22 03:23:09

问题


I am using Gitlab and I am trying to follow these instructions to upgrade my gitolite v2 to v3:

"If this issue occurs in 2.9.x you should reinstall gitolite.

1) backup all repositories. Just copy /home/git/repositories/* elsewhere.

2) Install new gitolite. See https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md

3) copy repositories back.

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

That's all.

That steps also related to users who wants to update gitolite v2 to v3"

My Gemfile and Gemfile.lock have rb-inotify in them as shown below:

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

I am trying to update my keys and repos using the following commands but I always get the error "no such file to load --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)

I've tried to do a bundle install , and the list of 'Using " does not contain the rb-notify gem.

I've tried to install the rb-inotify gem like so:

sudo -u gitlabhq gem install rb-inotify

I've wiped the Gemfile.lock file and then run:

sudo -u gitlabhq bundle install

Still no luck.

How can I get Gitlab to recognize and use rb-inotify. Thank you -


回答1:


Recognizing that this is a bit old, I thought I'd leave something for posterity. In order to make these calls work you simply need to append:

RAILS_ENV=production

to your command. This is listed in the trouble shooting guide under the "Gitlab" section.




回答2:


I seemed to have fixed it by running:

bundle install --without production
bundle install


来源:https://stackoverflow.com/questions/13032580/ruby-gems-with-gitlab-no-such-file-to-load-rb-inotify

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!