instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.41k stars 2.42k forks source link

bundler install removes rails 7.1.3 #2328

Open amg-web opened 3 months ago

amg-web commented 3 months ago

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
ccutrer commented 3 months ago

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.

amg-web commented 3 months ago

@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.