title: Rails new command giving errors
body: <p>I've been racking my brains trying to solve these issues. Every time I try to create a new Rails app using the <code>rails new</code> command, I get errors. The corresponding files are created, but I really want to get rid of these errors. I'm using MacOS Monterey, and before updating it everything went fine...</p>
  <p>I tried updating ruby, reinstalled rails, tried to pristine all gems, but nothing worked. In the end, I used <a href="https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/?utm_source=stackoverflow" rel="noreferrer">this</a> guide to install ruby using chruby, and then installed rails, but I still get these errors. I think I might be going a bit crazy, been trying to solve these issues for too long. Here are the errors that I get:</p>
  <pre><code>Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0
  Ignoring nio4r-2.5.8 because its extensions are not built. Try: gem pristine nio4r --version 2.5.8
  Ignoring websocket-driver-0.7.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.5
        create  
        create  README.md
        create  Rakefile
        create  .ruby-version
        create  config.ru
        create  .gitignore
        create  .gitattributes
        create  Gemfile
           run  git init from &quot;.&quot;
  Initialized empty Git repository in /Users/rares/Desktop/RoR/app/.git/
        create  package.json
        create  app
        create  app/assets/config/manifest.js
        create  app/assets/stylesheets/application.css
        create  app/channels/application_cable/channel.rb
        create  app/channels/application_cable/connection.rb
        create  app/controllers/application_controller.rb
        create  app/helpers/application_helper.rb
        create  app/javascript/channels/consumer.js
        create  app/javascript/channels/index.js
        create  app/javascript/packs/application.js
        create  app/jobs/application_job.rb
        create  app/mailers/application_mailer.rb
        create  app/models/application_record.rb
        create  app/views/layouts/application.html.erb
        create  app/views/layouts/mailer.html.erb
        create  app/views/layouts/mailer.text.erb
        create  app/assets/images
        create  app/assets/images/.keep
        create  app/controllers/concerns/.keep
        create  app/models/concerns/.keep
        create  bin
        create  bin/rails
        create  bin/rake
        create  bin/setup
        create  bin/spring
        create  bin/yarn
        create  config
        create  config/routes.rb
        create  config/application.rb
        create  config/environment.rb
        create  config/cable.yml
        create  config/puma.rb
        create  config/spring.rb
        create  config/storage.yml
        create  config/environments
        create  config/environments/development.rb
        create  config/environments/production.rb
        create  config/environments/test.rb
        create  config/initializers
        create  config/initializers/application_controller_renderer.rb
        create  config/initializers/assets.rb
        create  config/initializers/backtrace_silencers.rb
        create  config/initializers/content_security_policy.rb
        create  config/initializers/cookies_serializer.rb
        create  config/initializers/cors.rb
        create  config/initializers/filter_parameter_logging.rb
        create  config/initializers/inflections.rb
        create  config/initializers/mime_types.rb
        create  config/initializers/new_framework_defaults_6_1.rb
        create  config/initializers/permissions_policy.rb
        create  config/initializers/wrap_parameters.rb
        create  config/locales
        create  config/locales/en.yml
        create  config/master.key
        append  .gitignore
  /Users/rares/.gem/ruby/2.7.2/gems/activesupport-6.1.4.1/lib/active_support/message_encryptor.rb:170:in `auth_data=': couldn't set additional authenticated data (OpenSSL::Cipher::CipherError)
      from /Users/rares/.gem/ruby/2.7.2/gems/activesupport-6.1.4.1/lib/active_support/message_encryptor.rb:170:in `_encrypt'
      from /Users/rares/.gem/ruby/2.7.2/gems/activesupport-6.1.4.1/lib/active_support/message_encryptor.rb:148:in `encrypt_and_sign'
      from /Users/rares/.gem/ruby/2.7.2/gems/activesupport-6.1.4.1/lib/active_support/encrypted_file.rb:88:in `encrypt'
      from /Users/rares/.gem/ruby/2.7.2/gems/activesupport-6.1.4.1/lib/active_support/encrypted_file.rb:61:in `write'
      from /Users/rares/.gem/ruby/2.7.2/gems/activesupport-6.1.4.1/lib/active_support/encrypted_configuration.rb:29:in `write'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/generators/rails/credentials/credentials_generator.rb:30:in `add_credentials_file_silently'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/generators/rails/app/app_generator.rb:194:in `credentials'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/generators/app_base.rb:165:in `public_send'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/generators/app_base.rb:165:in `build'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/generators/rails/app/app_generator.rb:386:in `create_credentials'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `block in invoke_all'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `each'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `map'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `invoke_all'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/group.rb:232:in `dispatch'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/commands/application/application_command.rb:26:in `perform'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
      from /Users/rares/.gem/ruby/2.7.2/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/lib/rails/cli.rb:18:in `&lt;top (required)&gt;'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      from /Users/rares/.gem/ruby/2.7.2/gems/railties-6.1.4.1/exe/rails:10:in `&lt;top (required)&gt;'
      from /usr/local/bin/rails:23:in `load'
      from /usr/local/bin/rails:23:in `&lt;main&gt;'
  </code></pre>
  <p>Running <code>gem pristine ...</code> doesn't do much, the errors are still there. Any help is appreciated!</p>