Skip to content

Conversation

@schneems
Copy link
Contributor

@schneems schneems commented Dec 12, 2025

Previously we downloaded a version from S3. This moves the classic buildpack to be more like the CNB https://github.com/heroku/buildpacks-ruby/blob/8729d93fbef99696ec1f039a4accc52a2f98f3bc/buildpacks/ruby/src/layers/bundle_download_layer.rs.

If there are no problems with this technique, we should be able to install and use arbitrary bundler versions

@schneems schneems force-pushed the schneems/gem-install-bundler branch 5 times, most recently from 6cd0301 to bc21694 Compare December 12, 2025 03:08
@schneems schneems marked this pull request as ready for review December 12, 2025 04:07
@schneems schneems requested a review from a team as a code owner December 12, 2025 04:07
@schneems schneems force-pushed the schneems/gem-install-bundler branch 2 times, most recently from 11d9705 to f162266 Compare December 12, 2025 21:05
@schneems schneems changed the base branch from main to schneems/re-apply-reverted-refactor-pr December 12, 2025 21:05
@schneems schneems changed the title Install bundler via gem install [stacked] Install bundler via gem install Dec 12, 2025
@schneems schneems marked this pull request as draft December 12, 2025 21:07
@schneems schneems force-pushed the schneems/re-apply-reverted-refactor-pr branch 7 times, most recently from fd234d7 to c64cddc Compare December 20, 2025 13:58
Base automatically changed from schneems/re-apply-reverted-refactor-pr to main January 5, 2026 16:40
This strategy can also be used in the Ruby CNB. This is needed to make this a refactor and preserve the ability to set default_config_vars before calling `bundle install` based on gems (versus after calling `bundle install` we can use `bundle list` output/parsing).
@schneems schneems force-pushed the schneems/gem-install-bundler branch from f162266 to 76d9df2 Compare January 6, 2026 00:00
@schneems schneems changed the title [stacked] Install bundler via gem install Install bundler via gem install Jan 6, 2026
@schneems schneems force-pushed the schneems/gem-install-bundler branch 4 times, most recently from 1f6b444 to e1abf82 Compare January 6, 2026 00:17
We know where bundler will live, we can put it in the right place from the start.
The prior directory check only looked at `vendor/bundle/#{engine}/#{major}.#{minor}.0` (which does not include the bundler version). This prevented installing/updating bundler versions. The logic now checks the specific bundler version before skipping installation.
@schneems schneems force-pushed the schneems/gem-install-bundler branch from e1abf82 to 45d7caf Compare January 6, 2026 00:21
@schneems schneems marked this pull request as ready for review January 6, 2026 00:47
@schneems schneems merged commit 9ea7b98 into main Jan 6, 2026
4 checks passed
@schneems schneems deleted the schneems/gem-install-bundler branch January 6, 2026 21:40
@heroku-linguist heroku-linguist bot mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants