Rails: How to disable turbolinks in Rails 5?

The following was copied from here. It’s for Rails 4, but I believe the steps are the same.

  1. Remove the gem 'turbolinks' line from Gemfile.

  2. Remove the //= require turbolinks from app/assets/javascripts/application.js.

  3. Remove the two "data-turbolinks-track" => true hash key/value pairs from app/views/layouts/application.html.erb.

Edit: As of at least Rails 5 the last step should refer to "data-turbolinks-track" => "reload" as opposed to "data-turbolinks-track" => true. Thanks to @boddhisattva

Edit: As of at least Rails 4.2 you can generate a project without turbolinks to begin with. Just use something like this:

rails new my_app --skip-turbolinks

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)