No tailwind.config.js in new Rails 8 project

Hello, i would need some help.

I created a new rails app like rails new my-app --css tailwind --js esbuild

It works great, I can work with tailwind and js.

But now I need to configure tailwind in tailwind.config.js and can’t find it. Just adding the file does not help. AI says I had to add it to esbuild.config.js but this is missing either.

I tried to run bin/rails tailwindcss:installbut got “Unrecognized command “tailwindcss:install” (Rails::Command::UnrecognizedCommandError)”

Any help appreciated, thanks!

Which verions of Rails and TailwindCSS are you using? Since TailwindCSS v4, its configuration shifted from using tailwind.config.js to CSS first configuration. Check this link for more details: