Rails UJS outside the asset pipeline/with modules
This blog post was originally published a little while ago. Please consider that it may no longer be relevant or even accurate.
With Rails 5.1 the team replaced the great
jquery-ujs library with
However, if you try and load it up outside the Rails asset pipeline it's not as simple as
//= require rails-ujs. When you use the module version of it you'll need to first import it, then start it. So, run
yarn install rails-ujs to add the dependency and then boot it up in your app.