Skip to content
CAI
Software that uses CAICheck a score

rails/tailwindcss-rails

65.0

Adequate · 19 September 2026

387

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a Ruby gem that integrates Tailwind CSS v4 into Rails applications, providing generators for scaffolds, controllers, mailers, and authentication views. It manages the CSS build process through a Puma plugin and background watch tasks, while handling engine integration and asset precompilation. The project also includes comprehensive test infrastructure to verify installation, upgrades, and generator outputs.

How it got here

2021 — Tailwind CSS v4 integration and generator expansion

14 changes.

The project upgraded its Tailwind CSS integration to version 4, replacing the legacy JavaScript-based asset pipeline with a native CSS approach and introducing an engine-based architecture for better modularity. It expanded its feature set by adding dedicated generators for scaffolds, controllers, and mailers to provide consistent, pre-styled UI components. The period also focused on improving developer experience and test stability through new bin scripts, VS Code dev container support, and a refactored test infrastructure using isolated temporary directories.

2022–2025 — Tailwind CSS integration and testing

6 changes.

This period focused on deepening the Tailwind CSS integration by introducing a Puma plugin for process management, refining authentication generators, and expanding test coverage for both the engine and user installation journeys. It also included behavioral adjustments to hide internal generators and improve mobile responsiveness in authentication views, alongside a fix for Turbo-related system test failures.

Features

Add Puma plugin for Tailwind CSS integration

A new Puma plugin (\lib/puma/plugin/tailwindcss.rb\) is introduced to automatically manage the Tailwind CSS watch process alongside the Puma server. The plugin forks a background process to run \bin/rails tailwindcss:watch\ using \IO.popen\ to prevent stdin conflicts with tools like IRB. It includes logic to monitor both processes, stopping Tailwind when Puma exits and vice versa. To ensure compatibility with Puma 7, the plugin conditionally registers the shutdown handler using \after\_stopped\ for Puma versions 7 and above, falling back to \on\_stopped\ for earlier versions.

lib/puma · high confidence

Add Tailwind CSS mailer generator with customizable templates

Users can now generate mailers that include Tailwind CSS-compatible HTML and text templates. This change introduces a new \Tailwindcss::Generators::MailerGenerator\ that inherits from Rails' default ERB mailer generator, allowing applications to override the provided templates via \lib/templates/erb/mailer\. The generator includes default templates for HTML and text views, as well as layout files, ensuring consistent styling for generated email content.

lib/generators/tailwindcss/mailer · high confidence

Add Tailwind CSS scaffold generator

Introduces a new scaffold generator that produces views styled with Tailwind CSS. This generator extends the standard ERB scaffold generator to provide Tailwind-specific templates for index, edit, show, new, and form views, along with a partial, allowing users to generate scaffolds with pre-styled UI components.

lib/generators/tailwindcss/scaffold · high confidence

Add Tailwind CSS scaffold templates for Rails views

The generator now produces scaffold views styled with Tailwind CSS, replacing the previous default markup. The new templates include a form partial with improved mobile responsiveness, consistent double-quote usage, and specific styling for password fields, attachments, and boolean attributes. The index view uses a flex layout to position action buttons to the right of each record and employs \turbo\_confirm\ for destroy actions instead of UJS. Show, new, and edit views are updated to match this design, ensuring a cohesive look across all generated pages.

lib/generators/tailwindcss/scaffold/templates · high confidence

Added VS Code Dev Container configuration for Ruby development

Developers can now open the project in a pre-configured VS Code Dev Container environment. The setup includes a Ruby 3 (bullseye) runtime with Node.js LTS, the rebornix.Ruby extension, and the GitHub CLI feature, providing a consistent local development experience without manual environment setup.

.devcontainer · high confidence

New bin scripts for setup, CI, and release

Added bin/setup to install dependencies and optional linting/security tools (actionlint, shellcheck, zizmor) via Homebrew or pacman; bin/ci to run unit and integration tests (including user install/upgrade scenarios) and optional linting/security checks; and bin/release to version, tag, push, and publish the gem to RubyGems.

bin · high confidence

Behavioural changes

Add Tailwind CSS controller generator with updated view template

The Tailwind CSS integration now includes a dedicated controller generator that inherits from the standard ERB controller generator. This generator uses a custom view template that replaces the previous heading structure with a div-wrapped layout, applying Tailwind utility classes (font-bold, text-4xl) to the controller action title and updating the descriptive paragraph to reference the generated path.

lib/generators/tailwindcss/controller · high confidence

Hide Tailwind CSS authentication generator from public scaffolding list

The Tailwind CSS-specific authentication generator is now hidden from the public list of available generators (rails g). This change ensures that users do not accidentally invoke the Tailwind variant when generating authentication scaffolding, as it is intended to be used internally or via specific configuration rather than as a standalone public option.

lib/generators/tailwindcss/authentication · high confidence

Introduction of Engines, Commands, and Process Runner modules

The library now loads additional internal components to support new functionality. Specifically, it requires the \engines\, \commands\, and \process\_runner\ modules alongside the existing version and engine files. This structural change enables the application of engine-based architecture, command execution logic, and process management for the Tailwind CSS integration.

lib · high confidence

Migrate Tailwind CSS integration to v4 with new asset pipeline and dev server setup

The Tailwind CSS integration has been updated to support version 4, replacing the previous JavaScript-based asset pipeline with a native CSS import approach (\@import "tailwindcss"\) and a new \bin/dev\ script powered by Foreman. This change introduces a \Procfile.dev\ for managing the Rails server and Tailwind watch process, configures the application layout to include a centered container and proper stylesheet tags, and provides an upgrade task (\tailwindcss:upgrade\) that automatically migrates existing configurations, moves PostCSS settings, and runs the official Tailwind upgrader tool. The legacy \tailwindcss.rb\ installer and associated JavaScript assets have been removed.

lib/install · high confidence

Redesigned authentication views with improved mobile responsiveness and focus states

The authentication templates for sign-in, password reset, and password update have been updated to provide a better user experience on mobile devices and improved accessibility. The forms now use responsive width classes to adapt to smaller screens, and input fields feature explicit focus outlines (blue-600) to enhance keyboard navigation visibility.

lib/generators/tailwindcss/authentication/templates · high confidence

Refactored Rake task structure and added Tailwind CSS v4 upgrade support

The monolithic \tailwindcss\_tasks.rake\ has been split into dedicated files (\build.rake\, \clobber.rake\, \install.rake\, \upgrade.rake\) to improve organization. The build and watch tasks now accept \debug\, \silent\, and \verbose\ arguments to control output and asset generation, and the build task is automatically hooked into \assets:precompile\ and test preparation tasks. A new \tailwindcss:upgrade\ task has been introduced to facilitate migration from Tailwind CSS v3 to v4, while the legacy \purge\ task has been removed.

lib/tasks · high confidence

Removal of Tailwind CSS reset styles

The file containing Tailwind CSS reset styles (modern-normalize) has been deleted from the assets directory. This change removes the default browser style resets previously provided by this file, which may alter the baseline styling of the application if those resets are not replaced by another source.

app/assets · high confidence

Tailwind CSS v4 support and engine integration

The gem now supports Tailwind CSS v4, replacing the previous internal CSS purging logic with the native Tailwind build process. This change introduces automatic integration with Rails Engines, which now automatically detect and bundle engine-specific Tailwind stylesheets. Additionally, the gem disables default Rails stylesheet generation to avoid conflicts and ensures the Tailwind configuration directory is excluded from asset precompilation.

lib/tailwindcss · high confidence

Fixes

Fix system tests failing with Turbo and confirm dialogs

The Test Unit scaffold generator now automatically wraps destroy link actions in \accept\_confirm\ blocks within generated system tests when Turbo is present. This prevents test failures caused by Turbo's default confirmation behavior, ensuring generated system tests run successfully out of the box.

_lib/generators/test\unit · high confidence

Test coverage

Added integration tests for user install and upgrade journeys; Added test coverage for Tailwind CSS generators; Added tests for Tailwind CSS command generation, engine bundling, and process signal handling; Refactor test infrastructure to use isolated temporary directories and debug gem; Removed test dummy application scaffolding.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 65.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 57
  • Readiness 66
  • Security 84

Changes since last survey

  • 300 commits — 279 feature/other, 21 fixes

By area

  • (root) — 132 commits
  • (repo) — 96 commits
  • .github/workflows — 27 commits
  • lib/generators — 22 commits
  • test/integration — 7 commits
  • lib/install — 6 commits
  • lib/tailwindcss — 5 commits
  • lib/puma — 2 commits
  • .github/dependabot.yml — 1 commit
  • app/assets — 1 commit
  • bin/ci — 1 commit

Notable commits

  • fix: Fix Puma plugin entry point issue
  • fix: Fix hardcoded attribute in form
  • fix: Fix naming regarding Rails form naming
  • fix: Fix read-only file system issue (#556)
  • fix: Merge pull request #409 from rails/flavorjones-rails8beta1-auth-templates-revert
  • fix: Merge pull request #416 from enderahmetyurt/fix/check-box
  • fix: Merge pull request #473 from rails/flavorjones-fix-stylesheet-link-tags
  • fix: Merge pull request #479 from rails/flavorjones-fix-tailwind-propshaft-again
  • fix: Merge pull request #513 from patriciomacadden/fix-hardcoded-attribute
  • fix: Merge pull request #520 from patriciomacadden/fix-system-tests
  • fix: Merge pull request #529 from rails/flavorjones/ci-fix-upgrade-test-3
  • fix: Merge pull request #570 from rails/flavorjones/ci-fix-202520
  • fix: Merge pull request #571 from bopm/fix/puma-plugin-engine-entry-point-issue
  • fix: Merge pull request #590 from rails/flavorjones/586-fix-scaffold
  • fix: Revert "Make copies of the auth templates for Rails 8 beta1"
  • fix: add accept_confirm if turbo is available so system tests don't fail. fixes #519
  • fix: ci: Fix integration tests with rails 7.2
  • fix: ci: fix integration tests with rails 8.0
  • fix: ci: fix pipeline
  • fix: fix: unnecessary stylesheet_link_tag for tailwind
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rails/tailwindcss-rails was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6523db16e2a4af2264579012495ee88b8d65fb76 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.