Repository: rails/rails
File: railties/lib/rails/generators/app_base.rb (Ruby)

Code before:
          packages << "node-gyp" # pkg-config already listed above

          packages << "python-is-python3"
        end

        packages.compact.sort
      end

      def css_gemfile_entry
        return if options[:api]
        return unless options[:css]

        if !using_js_runtime? && options[:css] == "tailwind"
          GemfileEntry.floats "tailwindcss-rails", "Use Tailwind CSS [https://github.com/rails/tailwindcss-rails]"
        elsif !using_js_runtime? && options[:css] == "sass"
          GemfileEntry.floats "dartsass-rails", "Use Dart SASS [https://github.com/rails/dartsass-rails]"
        else
          GemfileEntry.floats "cssbundling-rails", "Bundle and process CSS [https://github.com/rails/cssbundling-rails]"
        end
      end

      def cable_gemfile_entry
        return if options[:skip_action_cable] || !options[:skip_solid]

        comment = "Use Redis adapter to run Action Cable in production"
        GemfileEntry.new("redis", ">= 4.0.1", comment, {}, true)
      end

      def bundle_command(command, env = {})
        say_status :run, "bundle #{command}"

        # We are going to shell out rather than invoking Bundler::CLI.new(command)
        # because `rails new` loads the Thor gem and on the other hand bundler uses
        # its own vendored Thor, which could be a different version. Running both
        # things in the same process is a recipe for a night with paracetamol.
        #
        # Thanks to James Tucker for the Gem tricks involved in this call.
        _bundle_command = Gem.bin_path("bundler", "bundle")

        require "bundler"
        Bundler.with_original_env do
          exec_bundle_command(_bundle_command, command, env)
        end
      end

      def exec_bundle_command(bundle_command, command, env)
        full_command = %Q["#{Gem.ruby}" "#{bundle_command}" #{command}]
        if options[:quiet]
          system(env, full_command, out: File::NULL)
        else
          system(env, full_command)

Review comment (suggestion):
Feel free to ignore this cosmetic suggestion. In my brain I think "if action cable is enabled and solid is disabled, then mention Redis in the Gemfile". This would translate to something like the following:

```suggestion
        if !options[:skip_action_cable] && options[:skip_solid]
          comment = "Use Redis adapter to run Action Cable in production"
          GemfileEntry.new("redis", ">= 4.0.1", comment, {}, true)
        end
```

Code after:
          packages << "node-gyp" # pkg-config already listed above

          packages << "python-is-python3"
        end

        packages.compact.sort
      end

      def css_gemfile_entry
        return if options[:api]
        return unless options[:css]

        if !using_js_runtime? && options[:css] == "tailwind"
          GemfileEntry.floats "tailwindcss-rails", "Use Tailwind CSS [https://github.com/rails/tailwindcss-rails]"
        elsif !using_js_runtime? && options[:css] == "sass"
          GemfileEntry.floats "dartsass-rails", "Use Dart SASS [https://github.com/rails/dartsass-rails]"
        else
          GemfileEntry.floats "cssbundling-rails", "Bundle and process CSS [https://github.com/rails/cssbundling-rails]"
        end
      end

      def cable_gemfile_entry
        if !options[:skip_action_cable] && options[:skip_solid]
          comment = "Use Redis adapter to run Action Cable in production"
          GemfileEntry.new("redis", ">= 4.0.1", comment, {}, true)
        end
      end

      def bundle_command(command, env = {})
        say_status :run, "bundle #{command}"

        # We are going to shell out rather than invoking Bundler::CLI.new(command)
        # because `rails new` loads the Thor gem and on the other hand bundler uses
        # its own vendored Thor, which could be a different version. Running both
        # things in the same process is a recipe for a night with paracetamol.
        #
        # Thanks to James Tucker for the Gem tricks involved in this call.
        _bundle_command = Gem.bin_path("bundler", "bundle")

        require "bundler"
        Bundler.with_original_env do
          exec_bundle_command(_bundle_command, command, env)
        end
      end

      def exec_bundle_command(bundle_command, command, env)
        full_command = %Q["#{Gem.ruby}" "#{bundle_command}" #{command}]
        if options[:quiet]
          system(env, full_command, out: File::NULL)
        else
          system(env, full_command)