ActionController::RoutingError (no route found to match “/javascripts/defaults.js” with {:method=>:get})

Ruby on Rails Add comments

I was getting this error today in my Mongrel server logs. It was strange, because I didn’t think we were doing anything with Javascript.

It took me about an hour to track down, but I eventually found it. In our main layout, we had:

<%= javascript_include_tag 'defaults' %>

and it should have been

<%= javascript_include_tag :defaults %>

I guess RoR picks up on the symbol vs string and does something special.

I hope this helps somebody.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in