On rails 7 new:

uninitialized constant Gem::Source (NameError)

(defined?(@source) && @source) || Gem::Source::Installed.new
^^^^^^^^

bundler (2.3.8, default: 2.3.7)

Solution was to `gem update bundler`
bundler (2.3.11, 2.3.8, default: 2.3.7)