Ruby drops into irb when creating new rails app

I’m running ruby 2.7.5 from rbenv.

When I try to deploy a new rails app using rails new demo, it drops down into the rdb.

Using sprockets 4.0.3
Using sprockets-rails 3.4.2
Using sqlite3 1.4.2
Using stimulus-rails 1.0.4
Using turbo-rails 1.0.1
Bundle complete! 15 Gemfile dependencies, 58 gems now installed.
Gems in the groups development and test were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
         run  bundle binstubs bundler
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
       rails  importmap:install
/home/richard/.rbenv/versions/2.7.5/lib/ruby/2.7.0/x86_64-linux/continuation.so: warning: callcc is obsolete; use Fiber instead
Debug.rb
Emacs support available.

/home/richard/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:      Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
(rdb:1)

Skipping bootsnap gives me a similar problem.

Using sqlite3 1.4.2
Using stimulus-rails 1.0.4
Using turbo-rails 1.0.1
Bundle complete! 14 Gemfile dependencies, 56 gems now installed.
Gems in the groups development and test were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
         run  bundle binstubs bundler
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
       rails  importmap:install
/home/richard/.rbenv/versions/2.7.5/lib/ruby/2.7.0/x86_64-linux/continuation.so: warning: callcc is obsolete; use Fiber instead
Debug.rb
Emacs support available.

/home/richard/.rbenv/versions/2.7.5/lib/ruby/2.7.0/bundler/runtime.rb:61:        next unless (dep.groups & groups).any? && dep.should_include?
(rdb:1)

I’m guessing it’s a problem with require. But why would it drop into irb? Also if I continue in irb, it stops at other places.

Seems to be a problem with rails 7.0 https://github.com/rails/rails/issues/44234, works with 6.1 .