Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails Tailwind Apply Directives not rendering

Bishwas Bhandari asked in CSS

I dunno what I did wrong during this course of development, I think I have done something inside config/ directory, but my Tailwind CSS Apply Directives classes are not being rendered/working in the site.

Inside application.html.erb

    <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
    <%= favicon_link_tag "fav.png" %>
    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    <%= javascript_importmap_tags %>
    <%= render "components/meta" %>
Reply

I got the solution, I generated assets with the precompile command which generated assets in public dir, and the assets in the public dir were capturing the request not allowing the development server to release it's assets. I deleted the assets inside the public dir, now it's good. Thanks

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.