File: ruby-on-rails.md | Updated: 11/15/2025
⌘KCtrl KDocs Blog Showcase Sponsor Plus
Installation
Setting up Tailwind CSS in Ruby on Rails v8+ project.
01
Start by creating a new Rails project if you don't have one set up already. The most common approach is to use the Rails Command Line .
Terminal
rails new my-projectcd my-project
02
Install the tailwindcss-rails gem then run the install command to set up Tailwind CSS in your project.
Terminal
bundle add tailwindcss-rails./bin/rails tailwindcss:install
03
Run your build process with ./bin/dev.
Terminal
./bin/dev
04
Start using Tailwind's utility classes to style your content.
index.html.erb
<h1 class="text-3xl font-bold underline"> Hello world!</h1>
Copyright © 2025 Tailwind Labs Inc.·Trademark Policy