-
Notifications
You must be signed in to change notification settings - Fork 405
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
jquery-rails doesn't work correctly in Rails 7 #291
Comments
@infernaLwizarD I just read this morning a really good response on StackOverflow on setting up jQuery on Rails 7 using importmaps. Hope this helps |
kidhab
added a commit
to foodcoops/sharedlists
that referenced
this issue
Feb 22, 2023
kidhab
added a commit
to foodcoops/sharedlists
that referenced
this issue
Feb 22, 2023
kidhab
added a commit
to foodcoops/sharedlists
that referenced
this issue
Feb 22, 2023
kidhab
added a commit
to foodcoops/sharedlists
that referenced
this issue
Feb 22, 2023
kidhab
added a commit
to foodcoops/sharedlists
that referenced
this issue
Feb 22, 2023
* Switch to importmap and get rid of webpack * Load jquery without importmap. Fixes rails/jquery-rails#291
Hi @eclectic-coding @infernaLwizarD, I am working on a rails upgrade to 7.0.7 but jQuery is not working now. How to fix that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
And after that the error was gone, but I would like to use the gem again.
The text was updated successfully, but these errors were encountered: