What happened?
Installing red-adbc fails on a clean Debian/Ubuntu under Ruby 4.0 (Bundler 4.0):
libadbc-glib-dev cannot be found and the install aborts. The same gems install
fine under Ruby 3.2-3.4.
'red-adbc.gemspec' declares its Debian/RHEL system package ( libadbc-glib-dev /
adbc-glib-devel ) but not the Apache Arrow repository the package comes from. It
has worked only because its dependency 'red-arrow' registers that shared
repository first: 'red-arrow.gemspec' declares the full 'try -> install
apache-arrow-apt-source -> retry' recipe, while red-adbc has no such fallback.
Bundler 4.0 (ruby/rubygems#9381, "Split the download and install process of a
gem") installs pure-ruby gems as soon as they are downloaded, without waiting for
their native-extension dependencies. red-adbc is pure ruby; red-arrow has a native
extension. So under Bundler 4.0 red-adbc installs before red-arrow, its
rubygems-requirements-system hook runs before the Apache Arrow repository is
registered, and libadbc-glib-dev cannot be located.
Install order was never a Bundler guarantee; the underlying gap is that red-adbc's
system-requirement declaration is incomplete — it names the package but not the
repository it comes from.
Stack Trace
INFO: requirements: system: libadbc-glib-dev: install: Start
E: Unable to locate package libadbc-glib-dev
ERROR: requirements: system: libadbc-glib-dev: install: Failed.
ERROR: Error installing red-adbc:
pre-install hook at .../rubygems-requirements-system-0.1.6/lib/rubygems_plugin.rb:16 failed for red-adbc-1.11.0
How can we reproduce the bug?
This 'bundle install' failure is a Bundler 4.0 install-order regression. It
reproduces with nothing but red-adbc + rubygems-requirements-system. Two files:
# Gemfile
source "https://rubygems.org/"
plugin "rubygems-requirements-system"
gem "red-adbc", "1.11.0"
# Dockerfile (amd64: libadbc-glib-dev is amd64-only in the Arrow APT repo)
FROM --platform=linux/amd64 ruby:4.0
WORKDIR /repro
COPY Gemfile .
CMD ["bundle", "install", "--jobs=4"]
docker build -t repro . && docker run --rm repro
Same Ruby (the ruby:4.0 image), same gems — only the Bundler version differs:
| Bundler |
install order |
result |
| 4.0.10 (bundled) |
red-adbc (pure-ruby) first |
NG: E: Unable to locate package libadbc-glib-dev (exit 5) |
| 2.7.2 (last 2.x) |
red-arrow (native) first |
OK: Bundle complete! (exit 0) |
# contrast: same image, downgrade Bundler
docker run --rm repro sh -c 'gem install bundler -v 2.7.2 >/dev/null && bundle _2.7.2_ install --jobs=4'
Under 4.0 the pure-ruby red-adbc is installed before the native red-arrow, so
red-adbc's requirement hook runs while the Apache Arrow repo is still unregistered.
Under 2.7.2 red-arrow installs first and registers the repo, so red-adbc then finds
its package — which is why Ruby 3.2-3.4 (Bundler 2.x) are unaffected.
Environment/Setup
- red-adbc 1.11.0, red-arrow 24.0.0, rubygems-requirements-system 0.1.6
- Ruby 4.0.x, Bundler 4.0.10
What happened?
Installing red-adbc fails on a clean Debian/Ubuntu under Ruby 4.0 (Bundler 4.0):
libadbc-glib-dev cannot be found and the install aborts. The same gems install
fine under Ruby 3.2-3.4.
'red-adbc.gemspec' declares its Debian/RHEL system package ( libadbc-glib-dev /
adbc-glib-devel ) but not the Apache Arrow repository the package comes from. It
has worked only because its dependency 'red-arrow' registers that shared
repository first: 'red-arrow.gemspec' declares the full 'try -> install
apache-arrow-apt-source -> retry' recipe, while red-adbc has no such fallback.
Bundler 4.0 (ruby/rubygems#9381, "Split the download and install process of a
gem") installs pure-ruby gems as soon as they are downloaded, without waiting for
their native-extension dependencies. red-adbc is pure ruby; red-arrow has a native
extension. So under Bundler 4.0 red-adbc installs before red-arrow, its
rubygems-requirements-system hook runs before the Apache Arrow repository is
registered, and libadbc-glib-dev cannot be located.
Install order was never a Bundler guarantee; the underlying gap is that red-adbc's
system-requirement declaration is incomplete — it names the package but not the
repository it comes from.
Stack Trace
How can we reproduce the bug?
This 'bundle install' failure is a Bundler 4.0 install-order regression. It
reproduces with nothing but red-adbc + rubygems-requirements-system. Two files:
Same Ruby (the
ruby:4.0image), same gems — only the Bundler version differs:E: Unable to locate package libadbc-glib-dev(exit 5)Bundle complete!(exit 0)Under 4.0 the pure-ruby red-adbc is installed before the native red-arrow, so
red-adbc's requirement hook runs while the Apache Arrow repo is still unregistered.
Under 2.7.2 red-arrow installs first and registers the repo, so red-adbc then finds
its package — which is why Ruby 3.2-3.4 (Bundler 2.x) are unaffected.
Environment/Setup