bundler install removes rails 7.1.3
update or fresh install prod version
bundler is configured with clean option
bundle config set --local clean 'true'
affected all versions after version "origin/stable/2024-01-31"
bundler installes rails 7.1.3 then removes
suppose reason is same as https://github.com/instructure/canvas-lms/issues/2316
$ bundle install |grep rails
Syncing to Gemfile.rails71.lock...
Fetching rails 7.1.3
Installing rails 7.1.3
Syncing to Gemfile.rails71.plugins.lock...
Removing rails (7.1.3)
$ ls -lh vendor/bundle/ruby/3.1.0/gems/ |grep rails-7
drwxr-xr-x 2 canvas canvas 4.0K Nov 28 15:03 rails-7.0.8
Try the following commands:
bundle config set --local cache_all true
bundle config set --local cache_all_platforms true
bundle config set --local no_prune true
In particular, the no_prune should prevent the gems from any given lockfile from being removed when installing for another lockfile.
@ccutrer Thanks. but I was trying to exclude test gems, but after recent changes I have to include them, to avoid problems and also clean directive I should use only once during update in this case.