Skip to content

fix(layout): link only the built stylesheet - #5

Merged
jaspermayone merged 1 commit into
mainfrom
fix/stylesheet-link
Nov 9, 2026
Merged

jaspermayone merged 1 commit into
mainfrom
fix/stylesheet-link

Conversation

@jaspermayone

Copy link
Copy Markdown
Member

Why

Every page load logs No route matches [GET] "/assets/tailwindcss". The layout used stylesheet_link_tag :app, which links every stylesheet Propshaft knows. In production that is three files:

File What it is
application-*.css The bun run build:css output. It has the staging frame rules.
application.tailwind-*.css The raw Tailwind source. The browser follows its @import "tailwindcss" and gets a 404.
tailwind-*.css The tailwindcss-rails build of the same base styles, without the staging rules.

What

  • app/views/layouts/application.html.erb: link only application.
  • test/controllers/sessions_controller_test.rb: the layout has exactly one stylesheet link, and it is the built one. This test fails on main (3 links found).

Not in this PR

boxcar set up two Tailwind pipelines. The tailwindcss-rails gem, app/assets/tailwind/application.css and the second css: line in Procfile.dev still build builds/tailwind.css, which nothing links now. Removing them is a separate cleanup.

Checks

bin/rails test (61 runs, 0 failures), rubocop, herb lint and format pass. An adversarial review found no issue. It checked that assets:precompile in the Dockerfile builds application.css through cssbundling-rails.

@jaspermayone
jaspermayone merged commit d066e31 into main Nov 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant