Search code examples
ruby-on-railsrubyrubygemsbundler

Gem installed but unavailable


I'm upgrading my Gitlab install but have an issue: the migration fails because it misses a dependency. Which look installed. That's weird.

$ sudo -u git -H bundle install --without postgres development test --deployment
Using timfel-krb5-auth 0.8.3
# ...
Using vmstat 2.3.0
Using webpack-rails 0.9.9
Using wikicloth 0.8.1
Bundle complete! 187 Gemfile dependencies, 266 gems now installed.
Gems in the groups postgres, development and test were not installed.
Bundled gems are installed into `./vendor/bundle`

Looks like timfel-krb5-auth is installed. But here is the output of migrating:

$ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
Could not find timfel-krb5-auth-0.8.3 in any of the sources
Run `bundle install` to install missing gems.

Any idea how to fix this?


Solution

  • I fixed it by dropping all installed dependencies:

    $ rm -rf ./vendor ./.bundle/
    

    Then re-install:

    $ sudo -u git -H bundle install --without postgres development test --deployment
    

    And finally, I got errors due to the wrong Gemfile. I found a solution here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11787/diffs