[DRE-maint] Bug#972702: ruby-bundler: dependency resolution fails for compiled gems

Lucas Kanashiro kanashiro at debian.org
Sat Oct 24 22:55:01 BST 2020


It seems the search path is not right in this newer ruby-bundler
version. Using the following Gemfile and running 'bundle --local' works
fine.

root at rubygems-test:~/test# cat Gemfile
path "/usr/share/rubygems-integration/2.7.0" do
  gem 'ffi'
end
root at rubygems-test:~/test# bundle --local
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle
as root will break this application for all non-root users on this machine.
Using bundler 2.2.0.rc.1
Using ffi 1.12.2 from source at `/usr/share/rubygems-integration/2.7.0`
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

Interestingly, I have 2 containers (one with ruby-bundler 2.2.0.rc.1 and
another with version 2.1.4) and both of them have the same set of
directories in GEM PATHS, so both should be looking at the same directories.

root at rubygems-test-old:~/test# bundler version
Bundler version 2.1.4 (2020-01-05 commit 32a4159325)
root at rubygems-test-old:~/test# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.0.rc.1
  - RUBY VERSION: 2.7.2 (2020-10-01 patchlevel 137) [x86_64-linux-gnu]
  - INSTALLATION DIRECTORY: /var/lib/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /root/.local/share/gem/ruby/2.7.0
  - RUBY EXECUTABLE: /usr/bin/ruby2.7
  - GIT EXECUTABLE:
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - SPEC CACHE DIRECTORY: /root/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /var/lib/gems/2.7.0
     - /root/.local/share/gem/ruby/2.7.0
     - /usr/local/lib/ruby/gems/2.7.0
     - /usr/lib/ruby/gems/2.7.0
     - /usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0
     - /usr/share/rubygems-integration/2.7.0
     - /usr/share/rubygems-integration/all
     - /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin


root at rubygems-test:~/test# bundler version
Bundler version 2.2.0.rc.1 (2020-10-24 commit unknown)
root at rubygems-test:~/test# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.0.rc.1
  - RUBY VERSION: 2.7.2 (2020-10-01 patchlevel 137) [x86_64-linux-gnu]
  - INSTALLATION DIRECTORY: /var/lib/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /root/.local/share/gem/ruby/2.7.0
  - RUBY EXECUTABLE: /usr/bin/ruby2.7
  - GIT EXECUTABLE:
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - SPEC CACHE DIRECTORY: /root/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /var/lib/gems/2.7.0
     - /root/.local/share/gem/ruby/2.7.0
     - /usr/local/lib/ruby/gems/2.7.0
     - /usr/lib/ruby/gems/2.7.0
     - /usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0
     - /usr/share/rubygems-integration/2.7.0
     - /usr/share/rubygems-integration/all
     - /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin

I'll keep investigating to understand what is going on.

-- 
Lucas Kanashiro



More information about the Pkg-ruby-extras-maintainers mailing list