Expected Behavior
A Docker container, built with a recent version of paketobuildpacks/builder-jammy-buildpackless-full for a Ruby on Rails application, should start successfully. A command like launcher bundle exec rake db:prepare should be able to load all gems specified in the Gemfile.lock, including platform-specific native gems.
Current Behavior
When using a recent version of paketobuildpacks/builder-jammy-buildpackless-full (i.e., not pinned to an older version), the container fails to start. The entrypoint command launcher bundle exec rake db:prepare fails with a Bundler::GemNotFound error.
The error indicates that a platform-specific native gem cannot be found, even though the build environment and the runtime environment are identical (amd64).
Error Log:
bundler: failed to load command: rake (/layers/paketo-buildpacks_bundle-install/launch-gems/ruby/3.4.0/bin/rake)
/layers/paketo-buildpacks_bundler/bundler/gems/bundler-2.5.18/lib/bundler/definition.rb:603:in 'Bundler::Definition#materialize': Could not find google-protobuf-3.25.8-x86_64-linux in locally installed gems (Bundler::GemNotFound)
from /layers/paketo-buildpacks_bundler/bundler/gems/bundler-2.5.18/lib/bundler/definition.rb:193:in 'Bundler::Definition#specs'
from /layers/paketo-buildpacks_bundler/bundler/gems/bundler-2.5.18/lib/bundler/definition.rb:260:in 'Bundler::Definition#specs_for'
from /layers/paketo-buildpacks_bundler/bundler/gems/bundler-2.5.18/lib/bundler/runtime.rb:18:in 'Bundler::Runtime#setup'
from /layers/paketo-buildpacks_bundler/bundler/gems/bundler-2.5.18/lib/bundler.rb:164:in 'Bundler.setup'
...
This issue does not occur when pinning the builder to an older version like paketobuildpacks/builder-jammy-buildpackless-full:0.0.260. A container built with this older version starts without any issues.
Steps to Reproduce
- Set up a Ruby on Rails project that has a transitive dependency on a native gem (e.g.,
google-protobuf via an OpenTelemetry library).
- Ensure the
Gemfile.lock is generated on an amd64 machine and explicitly contains the x86_64-linux platform. The Gemfile.lock should list the native gem, for example: google-protobuf (3.25.8-x86_64-linux).
- Use a CI/CD pipeline (like GitLab Auto DevOps with
pack) running on an amd64 architecture.
- Build the application using a recent, unpinned version of the builder:
paketobuildpacks/builder-jammy-buildpackless-full.
- Set the container's start command to
launcher bundle exec rake db:prepare (or any other rake/bundle command that loads the application environment).
- Attempt to run the container on an
amd64 Kubernetes cluster or locally via Docker.
- Observe the
Bundler::GemNotFound failure as described above.
- As a control, change the builder to
paketobuildpacks/builder-jammy-buildpackless-full:0.0.260 and rebuild the image without any other changes. The container built with this version will start successfully.
Motivations
This issue appeared suddenly in our CI/CD pipelines without any changes to our application code, dependencies, pipeline configuration or k8s infrastructure. This strongly suggests the regression was introduced by an update to the builder pulled (no version pin).
Expected Behavior
A Docker container, built with a recent version of
paketobuildpacks/builder-jammy-buildpackless-fullfor a Ruby on Rails application, should start successfully. A command likelauncher bundle exec rake db:prepareshould be able to load all gems specified in theGemfile.lock, including platform-specific native gems.Current Behavior
When using a recent version of
paketobuildpacks/builder-jammy-buildpackless-full(i.e., not pinned to an older version), the container fails to start. The entrypoint commandlauncher bundle exec rake db:preparefails with aBundler::GemNotFounderror.The error indicates that a platform-specific native gem cannot be found, even though the build environment and the runtime environment are identical (
amd64).Error Log:
This issue does not occur when pinning the builder to an older version like
paketobuildpacks/builder-jammy-buildpackless-full:0.0.260. A container built with this older version starts without any issues.Steps to Reproduce
google-protobufvia an OpenTelemetry library).Gemfile.lockis generated on anamd64machine and explicitly contains thex86_64-linuxplatform. TheGemfile.lockshould list the native gem, for example:google-protobuf (3.25.8-x86_64-linux).pack) running on anamd64architecture.paketobuildpacks/builder-jammy-buildpackless-full.launcher bundle exec rake db:prepare(or any other rake/bundle command that loads the application environment).amd64Kubernetes cluster or locally via Docker.Bundler::GemNotFoundfailure as described above.paketobuildpacks/builder-jammy-buildpackless-full:0.0.260and rebuild the image without any other changes. The container built with this version will start successfully.Motivations
This issue appeared suddenly in our CI/CD pipelines without any changes to our application code, dependencies, pipeline configuration or k8s infrastructure. This strongly suggests the regression was introduced by an update to the builder pulled (no version pin).