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
--localfor 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
--globalonly 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 flag | Value / default | Applies to | Source |
|---|---|---|---|
bundle config set --local without | development test; stored in the application's .bundle/config | Bundler current docs | config |
BUNDLE_WITHOUT | Value development:test; colon-separated environment form | Bundler current docs | config, upgrade guide |
bundle config list | Show active settings and where each originated | Bundler current docs | config |
bundle config get <name> | Show the value and all configured locations | Bundler current docs | config |
--global | Applies to all bundles of the current user | Bundler current docs | config |
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 symptom | Cause | Fix | Source |
|---|---|---|---|
| A previously remembered exclusion disappears after upgrade | Install flags relied on being remembered across invocations | Set application configuration explicitly | Hiroshi 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