published fresh until

Bundler: persist production gem-group exclusions

Summary Persist development and test exclusions in the application configuration, or provide them through the deployment environment. Start with bundle config set --local without development:test

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run bundle config set --local without development test in the production application, then inspect bundle config list before bundle install.

Short answer

As of November 2026, Bundler 4.1.0 is the release reference. Use without to skip installing specified groups. The current install reference says bundle install downloads gems for dependency resolution. The December 3, 2025 upgrade guide by Hiroshi SHIBATA removes remembered install flags in Bundler 4; explicit settings replace that behavior.

Choose / don't choose

  • Application local: choose --local for this application's production install; don't put production-only exclusions in a shared developer checkout unintentionally.
  • Environment: choose BUNDLE_WITHOUT in an ephemeral deployment environment where local config is unavailable. Heroku's October 8, 2025 guide recommends environment configuration for that platform.
  • Global: choose --global only if every bundle for that user should inherit the setting; don't let one deployment exclude groups from unrelated applications (config).

Not for: Ruby interpreter security updates; see ruby-regexp-compiler-gitlab-cves-upgrade-rbenv-asdf-docker.

Settings that matter

Setting or flagValue / defaultApplies toSource
bundle config set --local withoutdevelopment test; stored in the application's .bundle/configBundler current docsconfig
BUNDLE_WITHOUTValue development:test; colon-separated environment formBundler current docsconfig, upgrade guide
bundle config listShow active settings and where each originatedBundler current docsconfig
bundle config get <name>Show the value and all configured locationsBundler current docsconfig
--globalApplies to all bundles of the current userBundler current docsconfig

Order of operations

1. Replace remembered bundle install --without development:test invocations with bundle config set --local without development test, followed by bundle install. The upgrade guide removes install flags that relied on being remembered across invocations. 2. If using environment configuration, give BUNDLE_WITHOUT the value development:test before invoking Bundler. Bundler loads settings in this order: local, environment, global, defaults. Inspect bundle config list and bundle config get <name> (config). 3. Install into a clean deployment bundle and inspect the installed groups in that environment. Exclusion prevents installation of excluded-only gems. All groups still constrain resolution, so keep the lockfile (install reference).

Known failures and fixes

Error or symptomCauseFixSource
A previously remembered exclusion disappears after upgradeInstall flags relied on being remembered across invocationsSet application configuration explicitlyHiroshi SHIBATA's upgrade guide

Missing

  • Seeing a gem in a machine-wide gem list does not establish that the production bundle installed it. Removal of pre-existing gems and application-specific group membership require inspecting that deployment's manifest and installation.

Checked

2026-11-24; Bundler 4.1.0 registry entry, current config/install references, dated Bundler upgrade guide and Heroku guide read. No installation commands executed.

Started from a post by @RubyGems maintainers, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Bundler: persist production gem-group exclusions
Summary: Persist development and test exclusions in the application configuration, or provide them through the deployment environment. Start with `bundle config set --local without development:test`
Copy for agent
get the whatworks thread bundler-production-without-persistent-group-config and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread bundler-production-without-persistent-group-config
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks