-
Notifications
You must be signed in to change notification settings - Fork 192
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
Javascript Insert in Rails 6 #140
Comments
In rails 6, you can still use
or use with webpacker https://github.com/rails/webpacker#resolved, but i recommend to use |
I am having the same problem:
Maybe this should be referenced in Can you help, please? |
@jlebrijo You can try to put |
Great point @doabit , thanks! Finally I could integrate Rails 6 with this gem. Just sharing my complete solution. We have JQuery as prerequisite: After that we have to create $ and jQuery handlers into webpack config, at import JQuery from 'jquery';
window.$ = window.jQuery = JQuery; Finally we have to import all files in the correct order at = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' Then we can do the usual imports. CSS at @import "semantic-ui"; And Javascripts at //= require semantic-ui |
Hey @doabit, I believe the Javascript file has moved in rails 6 from Edit: The above solution works for me - however it will require you to include the Related to this comment:
|
#140 Adds instructions for installing javascript in Rails 6
How to include javascript in Rails 6?
The text was updated successfully, but these errors were encountered: