Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

couldn't find file 'turbolinks' in Rails 4.0.4 app

I just upgraded from Rails 3.2.17 to 4.0.4 and everything looks great. I copied over a lot of the config files from a brand new test 4.0.4 app I created. However, when I add in the following line to my app/assets/javascripts/application.js file, I get an error:

//= require turbolinks

The error is:

couldn't find file 'turbolinks'
  (in /Users/scott/Code/ucode/app/assets/javascripts/application.js:15)

I want turbolinks. I'm on Rails 4.0.4. My test app didn't have this error. Why am I getting this error and how do I fix it? I also updated my app/views/layouts/application.html.erb file to include:

<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
like image 349
at. Avatar asked Mar 15 '14 02:03

at.


1 Answers

Have you added the turbolinks gem to your Gemfile?

gem 'turbolinks'
like image 186
Joe Kennedy Avatar answered Nov 11 '22 17:11

Joe Kennedy