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

PhilBot picture PhilBot · Oct 23, 2012 · Viewed 8.6k times · Source

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 -

Answer

jsk187 picture jsk187 · Feb 7, 2013

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.