I am trying to get Turbolinks to work with my Rails 3.2 app, but without success. I am still getting full page reloads in Chrome and Firefox when I click on links.
Gemfile
, and required it in the application.js
file. Twitter Bootstrap 2.2.1.1
, and that all non-bootstrap/rails javascript is disabled. In Chrome developer tools I can see that turbolinks.js is loaded, together with all other files. Any suggestions on why turbolinks is not active in my app?
If you are using a bootstrap template, then the javascript (by default) is not placed in the <head>
element of your page.
I was able to reproduce the issue w/ Rails 3.2.11, turbolinks 1.0 and a default bootstrap template as my application layout
If you move <%= javascript_include_tag "application" %>
from the bottom of the layout (usually just above </body>
to somewhere within the <head>
element, then everything should start working.
a.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With