Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility classes not included in the production CSS #533

Open
magnum opened this issue Apr 7, 2025 · 4 comments
Open

Utility classes not included in the production CSS #533

magnum opened this issue Apr 7, 2025 · 4 comments

Comments

@magnum
Copy link

magnum commented Apr 7, 2025

I am developing an application using Rails, Tailwind 4, and deploying it with Kamal.

Gem versions:

rails 8.0.2 
tailwindcss-rails (4.2.2)
tailwindcss-ruby (4.1.3)
kamal (2.5.3)

When I run the application locally, it functions correctly. However, after deploying it with Kamal, the Tailwind CSS included in the image does not contain utility classes such as px-<number>, opacity-<number>, gap-<number>, h-<number>, top-<number>, and bottom-<number>, even though other similar classes appear to be present.

Here are the steps I have taken so far:

  • Verified that all classes are used directly within the template files (e.g., building them in Ruby, etc.).
  • Built remotely with Kamal using an AMD64 architecture.

here're the two different built files

tailwind-development.css.txt
tailwind-production.css.txt

Any suggestions?

@magnum magnum changed the title utilities classe not in production css Utility classes not included in the production CSS Apr 7, 2025
@powersurge360
Copy link

powersurge360 commented Apr 10, 2025

Also experiencing this. No idea what's causing it. @magnum what kind of jsbundling are you using? I'm experiencing this w/ esbuild.

@powersurge360
Copy link

powersurge360 commented Apr 10, 2025

I am willing to bet it's something along the lines of this #499 (comment)

ETA: Unbelievably, this seems to be the case. I decided to use the remote builder feature of kamal and reuse the same server that is hosting the application, and these properties began working. Woof.

@magnum
Copy link
Author

magnum commented Apr 11, 2025

@powersurge360 i'm using propshaft,
A few days ago, I attempted the remote build in Kamal, but I was unsuccessful. I just tried again, and it worked! I have made several attempts since then, and perhaps something has changed. However, I had tried many different approaches over the past few days and was losing hope. 🙂

It has been confirmed that the issue seems to be related to the architecture on which the Kamal build is based, as mentioned in #499 (comment).

@jspooner
Copy link

Also experiencing this. My app was deploying perfectly two days ago but is broken today.

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

No branches or pull requests

3 participants