Open fg-j opened 3 years ago
@paketo-buildpacks/ruby-maintainers This issue has been open for a while. Does this need to be investigated further before it's workable?
@richardTowers Is this still a problem for you?
@fg-j while this specific example doesn't fully apply anymore (because the buildpack runs with bundle-without
already now), the case in which the environment variables aren't taken into account still stands. I don't think further investigation is necessary.
What happened?
Please provide some details about the task you are trying to accomplish and what went wrong. We were trying to use some build-time configuration that the bundle tool natively respects to change the contents of the built app image. In particular, we wanted to take advantage of the
BUNDLE_WITHOUT
environment variable to exclude certain gems from the built app image. Rather than rebuilding the gems layer, the buildpack reused the cached version of the layer. The resulting app image included gems we didn't want in our image.Reproduction steps
ruby '~> 2.0'
group :test do gem 'rspec' end
gem 'puma' gem 'sinatra'
rspec
gem is present:BUNDLE_WITHOUT
env var to exclude thetest
group:The output should contain:
rspec
is still present in the app containerThe buildpack should rebuild the gems layer in a way that respects this native configuration. Notably, running
produces the desired result, where rspec gems are not present.
Checklist
Please confirm the following: