Open
Description
Hello, I started to use Rails 7 with importmap and faced the following problem: jquery-rails doesn't work correctly. When I try to use jquery on the page, an error appears:
Uncaught ReferenceError: $ is not defined
Because of this, I had to remove the gem and added files manually to vendor/javascript folder. Then in application.html.erb I added jquery.min like this:
<%= javascript_include_tag 'jquery-3.6.0.min', 'data-turbo-track': 'reload' %>
<%= javascript_importmap_tags %>
And after that the error was gone, but I would like to use the gem again.
Metadata
Metadata
Assignees
Labels
No labels