# Bundler frozen "deployment mode" after a Gemfile Edit in CI

> Fix Bundler refusing to install after a Gemfile edit because frozen mode forbids lockfile changes - re-lock locally, or set frozen false on a disposable runner.

Source: https://latchkey.dev/learn/ruby/bundler-frozen-after-gemfile-edit  
Updated: 2026-06-25

You edited the Gemfile but did not regenerate Gemfile.lock, and CI runs with frozen (deployment) mode on. Frozen mode forbids changing the lockfile during install, so the mismatch is a hard failure rather than a silent re-resolve.

## Diagnose it: Ruby version and platform

Bundler resolves against the Ruby version and the platform recorded in the lockfile. A runner on a different Ruby or a Linux platform missing from `Gemfile.lock` fails in a way that names a gem rather than the cause.

```Terminal
ruby -v && bundle -v
cat .ruby-version 2>/dev/null
bundle platform

# the usual CI-only failure: Linux platform absent from the lockfile
bundle lock --add-platform x86_64-linux
bundle install --jobs 4 --retry 3
```

> A gem that installs on macOS and fails on a Linux runner is usually a missing platform in `Gemfile.lock`, not a broken gem. Add the platform and commit the lockfile.

## FAQ

### What causes Bundler frozen "deployment mode" after a gemfile edit in CI?

There are 2 common causes: gemfile edited without re-locking and frozen / deployment enabled in ci. A gem was added, removed, or bumped in the Gemfile but bundle was never re-run, so Gemfile.lock no longer matches.

### How do I fix Bundler frozen "deployment mode" after a gemfile edit in CI?

There are 2 fixes depending on which cause you have: re-lock locally and commit and toggle frozen off only on a disposable runner. Work through them in order, since the first is the most common.

### What does Bundler frozen "deployment mode" after a gemfile edit in CI actually mean?

bundle install fails after a Gemfile change, reporting that running in frozen/deployment mode it cannot update Gemfile.lock, and listing what you added or changed.

### How do I stop Bundler frozen "deployment mode" after a gemfile edit in CI happening again?

Run bundle install after every Gemfile edit and commit the lockfile. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
