RRUI-017 · RapidRailsUI defect

Tailwind source rewrite guard misses the generated marker

The Tailwind integration initializer checks for a marker string that the installer does not write.

Openrapid_rails_ui v0.58.1reported 2026-10-05

Upstream triage requested. This was found while following the standard RapidRailsUI installation guide in a vanilla Rails 8 application using Importmap and Tailwind CSS v4.

At a glance

Component`rapid_rails_ui_tailwind.rb` / Tailwind v4 installer
ObservedThe initializer requires `RapidRailsUI gem components`, while the generated `application.css` contains `RapidRailsUI Gem Integration`. The guard exits before rewriting stale absolute `@source` paths.
ExpectedOn Rails boot, the initializer should rewrite component and helper source paths to the currently installed gem location.
ImpactMoving the app between machines, Ruby versions, or Docker/CI environments can leave Tailwind scanning a nonexistent developer-specific path and omit RapidRailsUI utility classes.

Reproduction

1. Install RapidRailsUI into an app on macOS.\n2. Inspect the generated marker in `app/assets/tailwind/application.css`.\n3. Boot the app with the generated initializer.\n4. Observe that the initializer's marker guard does not match, so the absolute `@source` path remains unchanged.

Suggested direction

Use one shared marker constant or match the exact marker emitted by the installer; add a regression test that boots with a stale path and verifies it is rewritten.

Consumer workaround

Change the initializer guard to `content.include?("RapidRailsUI Gem Integration")`, then boot once before the Tailwind build.