Skip to content

bundle install --deployment tries to rewrite Gemfile_next.lock #73

Description

@HoneyryderChuck

Running the following command when preparing the production image fails (DEPENDENCIES_NEXT is unset btw):

> bundle install --deployment --without="development test"

#OUTPUT
Installing bootboot 0.2.2
The dependencies in your gemfile changed, but the lockfile can't be updated because frozen mode is set

You have added to the Gemfile:
* rails (~> current_version)

You have deleted from the Gemfile:
* rails (~> next_version)

Run `bundle install` elsewhere and add the updated Gemfile_next.lock to version control.


If this is a development machine, remove the Gemfile_next.lock freeze by running `bundle config set frozen false`.

I've seen this warning, but I'm running bundler 2.6.9, so I guess that shouldn't be necessary?

Activity

  1. bschrag620 commented on May 7, 2026

    @bschrag620

    I'm also seeing this. Did you ever get it resolved?

    ruby -v
    => 3.4.7
    
    rails -v
    => 8.0.2
    
    DEPENDENCIES_NEXT=1 rails -v
    => 8.1.3
    
    bundler -v
    => 2.6.2
    

    All local and docker container versions match. Gemfile_next.lock is being copied into the docker container and shows a rails version of 8.1.3 as expected.

    Edit:
    My issue is the reverse of yours. Running bundle install in the container seems to be attempting to use Gemfile.lock rather than Gemfile_next.lock.

    #OUTPUT
    Installing bootboot 0.2.2
    The dependencies in your gemfile changed, but the lockfile can't be updated because frozen mode is set
    
    You have added to the Gemfile:
    * rails (~> next_version)
    
    You have deleted from the Gemfile:
    * rails (~> current_version)
    

    Solution:
    Fixed the gemfile

    plugin "bootboot"
    
    # instead of 
    gem "bootboot"
    

    🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions