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

No way to use the gem without sprockets installed #83

Closed
Kukunin opened this issue Feb 8, 2022 · 1 comment
Closed

No way to use the gem without sprockets installed #83

Kukunin opened this issue Feb 8, 2022 · 1 comment

Comments

@Kukunin
Copy link

Kukunin commented Feb 8, 2022

Hello. I'm so glad to see great progress on assets management in Rails, especially in Rails 7. I noticed that sprockets are no longer a required dependency, and webpacker is deprecated, so I decided to migrate to the latest assets management with jsbundling-rails, cssbundling-rails, esbuild, and tailwind.

But it was a surprise for me that sprockets is still required for the latest assets management. rails new comes with sprockets installed, and the latest released version of this gem expects the assets:precompile rake task to be defined.

The biggest problem is that

    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>

does not work without sprockets. It renders just elements as is:

    <link rel="stylesheet" href="/stylesheets/application.css" data-turbo-track="reload" />
    <script src="/javascripts/application.js" data-turbo-track="reload" defer="defer"></script>

that leads to 404 responses for the Rails.

As far as I understand the goal is to replace complicated and old sprockets with foreign tools, such as esbuild and tailwind, so that's why I created this issue to track the progress.

I'm sorry if I get something wrong, and these gems still expect sprockets to be installed

Thank you

@dhh
Copy link
Member

dhh commented Feb 9, 2022

You need either Sprockets or Propshaft.

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

2 participants