First, install jquery-turbolinks
gem. And then, don't forget to move your included Javascript files from end of body of your application.html.erb
to its <head>
.
As described here, if you have put the application javascript link in the footer for speed optimization reasons, you will need to move it into the tag so that it loads before the content in the tag. This solution worked for me.