All threads / Rails Tailwind Apply Directives not rendering
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" %>

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

Join the discussion

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

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

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

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.