Skip to content

Conversation

@gulkaran
Copy link
Contributor

Changes

  • Updated BundlerDiscovery#bundle_install to stop appending the --frozen flag to the bundle install command.
  • Introduced a new step that runs bundle config set --local frozen true before bundle install when a Gemfile.lock is present.
  • Updated unit tests to verify the new command structure and ensure the frozen configuration is applied correctly.

Context

The --frozen flag was deprecated and subsequently removed in Bundler 2.3+. Attempting to use it results in an error:

The --frozen flag has been removed because it relied on being remembered across bundler invocations... Instead please use bundle config set frozen true

This change restores compatibility with modern Bundler versions while preserving the intended "frozen" behaviour for deployments.

Comment on lines +48 to +50
def bundle_config_frozen
'bundle config set --local frozen true'
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Do we also need to have bundle config set --local frozen false explicitly (e.g. if we're using cached context and the config changes from one commit to the other)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, Shipit creates a fresh working directory for each task execution so there should be no risk of config being shared

@gulkaran gulkaran merged commit 2dfe2b2 into main Jan 15, 2026
15 checks passed
@gulkaran gulkaran deleted the gulkaran/fix-bundler-frozen-flag branch January 15, 2026 19:37
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