Error message:
An error occurred while installing nio4r (2.5.8), and Bundler cannot continue. In Gemfile: rails was resolved to 7.0.3, which depends on actioncable was resolved to 7.0.3, which depends on nio4r
For bundle install I solved the issue by running first:
bundle config build.nio4r --with-cflags="-Wno-incompatible-pointer-types"
This is necessary when your bundle configuration stores gems in a custom folder like ./vendor/bundle