Topic: no route found to match "/javascripts/defaults.js" with {:method=>:get

I keep getting this weird error on my production server.  I am running Apache/Mongrel, and I don't think I've done anything with javascript yet, but I'm not 100% sure.

Does anyone know what this means?

Here's the full stack trace:

ActionController::RoutingError (no route found to match "/javascripts/defaults.js" with {:method=>:get}):
    /vendor/rails/actionpack/lib/action_controller/routing.rb:1266:in `recognize_path'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:1256:in `recognize'
    /vendor/rails/railties/lib/dispatcher.rb:40:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243

Last edited by Micah (2007-02-26 18:54:54)

If there is a post/website/blog entry/whatever that answers my questions, please don't hesitate to simply post a link.  I know it can get old fast to answer the same question hundreds of times...

Re: no route found to match "/javascripts/defaults.js" with {:method=>:get

Always fixed the minute you post...

In my layout, I had:

<%= javascript_include_tag 'defaults' %>

which should have been
<%= javascript_include_tag :defaults %>

Hope this helps somebody else.

Last edited by Micah (2007-02-26 19:03:06)

If there is a post/website/blog entry/whatever that answers my questions, please don't hesitate to simply post a link.  I know it can get old fast to answer the same question hundreds of times...

Re: no route found to match "/javascripts/defaults.js" with {:method=>:get

Do you have this line in any views or layouts?

<%= javascript_include_tag :defaults %>

If so, try removing it (if you aren't using javascript/ajax).

Railscasts - Free Ruby on Rails Screencasts

Re: no route found to match "/javascripts/defaults.js" with {:method=>:get

Yep, that was sort of the issue.  I fixed it and everything works fine now.

I made a post on my blog ( http://blog.obsidianportal.com/?p=7 ) detailing the issue.  Hopefully it will get picked up by Google and provide insight for anyone with the same problems.

If there is a post/website/blog entry/whatever that answers my questions, please don't hesitate to simply post a link.  I know it can get old fast to answer the same question hundreds of times...