Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Did not recognize your adapter specification" turbolinks-related error in Rails 4

I was following the Getting Started part of the Rails Guides and created the welcome controller as per the tutorial. I started the server and opened http://localhost:3000/ and instead of the <h1>Hello, Rails!</h1> it was supposed to see, I got the error Did not recognize your adapter specification.

The error block was just some HTML from the application.html.erb file, this was the offending line:

<%= javascript_include_tag "application", "data-turbolinks-track" => true %>

If I remove this line from the file, it works as expected. I googled the error and it I saw it could have something to do with the json or coffeescript gems. I have those gems installed and up to date, along with the rails and turbolinks gems, and as far I can tell they all seem to be working fine.

This is not essential, but I'd like to have turbolinks working in my Rails apps. It also feels bad to be clueless about what is wrong. How can I solve this?

like image 265
San Diago Avatar asked Aug 13 '13 15:08

San Diago


2 Answers

I just ran into this problem again and googling again I found this question, with a similar problem.

I downgraded the multi_json gem to version 1.7.8 in the bundler, as mentioned there, and I stopped getting the error. I have yet to see if it will work in Heroku, but it's apparently solved the issue in development. If it doesn't, I'll update this answer.

like image 71
San Diago Avatar answered Oct 23 '22 01:10

San Diago


This is a github issue here: https://github.com/intridea/multi_json/issues/132 which was closed four months ago, reading the comments I found that one of the files had been named .css rather than .scss in the rails project. Maybe the same error is happening with your project. I had the same exact issue and downgrading my gem worked.

like image 27
Hrishi Avatar answered Oct 23 '22 01:10

Hrishi