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.

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

  1. Rich Says:

    Helped me this morning!

  2. ruby Says:

    This error comes when you are using rails with flex and svn as repository. in this case try to recreate html-template thru flex or delete html-template from your machine and copy this from some other machine(where the application is working) and then try to recreate this folder.

    we solved it thru this only.

    We are looking for any other workaround of this . if anybody knows please let me know.

Leave a Reply

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