Feb 26
ActionController::RoutingError (no route found to match “/javascripts/defaults.js” with {:method=>:get})
Ruby on Rails Add commentsI 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.




Recent Comments