rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 2k forks source link

Bundle does not find gems after bundle install. #7672

Closed bingyuanng closed 4 years ago

bingyuanng commented 4 years ago

Bundle failed to find nokogiri and other gems that is build with native extension. The gems that is used is packaged during pre-build pipeline by running bundle package --all. In build stage, gems were install using bundle install --binstubs --local --path vendor/bundle but bundle check throws me the following error.

The following gems are missing
 * nokogiri (1.10.5)
 * nio4r (2.5.2)
 * websocket-driver (0.6.5)
 * bloomfilter-rb (2.1.1)
 * byebug (9.0.6)
 * json (2.1.0)
 * semian (0.9.1)
 * shoulda-callback-matchers (1.1.4)
Install missing gems with `bundle install`

while the gems are found in vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static. I tried renaming the folder to vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0 and the gems was found.

bundler version : 1.17.3

Any idea what could be the cause of this issue ?

bingyuanng commented 4 years ago

Found out that this is more of a rbenv issue. Refer: https://github.com/rbenv/ruby-build/issues/1387