# Error message

**URL:** <https://discuss.rubyonrails.org/t/error-message/38059>\
**Category:** rubyonrails-talk\
**Created:** [January 7, 2009, 9:53pm UTC](https://discuss.rubyonrails.org/t/error-message/38059 "2009-01-07T21:53:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [January 7, 2009, 9:53pm UTC](https://discuss.rubyonrails.org/t/error-message/38059/1 "2009-01-07T21:53:10Z")

</div>

I have this app where people can build a profile full of various kinds of data. The first page that they see when they create their profile is a page named 'new'. If you add an id number for the company you work for - one that is already know by the user - it automaticaly fills in your company address information for you. Everything works fine, but I just happen to be looking at my logs and I see that everytime the 'new' page is visited it is throwing some kind of error:

ActionController::RoutingError (No route matches "/javascripts/defaults.js" with {:method=\>:get}): &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/routing/recognition\_optimisation.rb:67:in `recognize_path' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/route_set.rb:384:in `recognize' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/dispatcher.rb:148:in `handle_request' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in `dispatch' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/dispatcher.rb:104:in `synchronize' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `dispatch' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/dispatcher.rb:120:in `dispatch_cgi' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in `dispatch' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:76:in `process' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in `synchronize' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in `process' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process\_client' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process\_client' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel\_rails:128:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel\_rails:281 &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:502:in `load' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:354:in `new_constants_in' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64 &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `gem_original_require' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in `require' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new\_constants\_in' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in `require' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require' &nbsp;&nbsp;&nbsp;&nbsp;c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `require' &nbsp;&nbsp;&nbsp;&nbsp;./script/server:3 &nbsp;&nbsp;&nbsp;&nbsp;-e:2:in `load' &nbsp;&nbsp;&nbsp;&nbsp;-e:2

Rendering c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/templates/rescues/layout.erb (not\_found)

Everything seems to be working fine, the profile get created and the company address gets saved but I would like to make it so that this error is not thrown. I imagine that this is a routing issue, but I honestly am not certain of that. Anyone have any ideas about what is happening and how to stop it from throwing these errors? Thanks,

-S

---

<div class="post-metadata">

**Author:** ![rab](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/rab/32/710_2.png) [@rab](https://discuss.rubyonrails.org/u/rab)\
**Post date:** [January 7, 2009, 10:11pm UTC](https://discuss.rubyonrails.org/t/error-message/38059/2 "2009-01-07T22:11:47Z")

</div>

You probably want to let the static assets like javascript files be served directly by the front-end. For example, in the Apache configuration you could put:

&nbsp;&nbsp;&nbsp;# These directories should always be served up by Apache, since they contain static content. Or just let rails do it. &nbsp;&nbsp;&nbsp;ProxyPass /images ! &nbsp;&nbsp;&nbsp;ProxyPass /stylesheets ! &nbsp;&nbsp;&nbsp;ProxyPass /javascripts ! &nbsp;&nbsp;&nbsp;ProxyPass /favicon.ico !

Of course, if the file javascripts/default.js doesn't exist (which might be another reason), you just want to find and remove the: &nbsp;&nbsp;&nbsp;javascript\_include\_tag :defaults from your layout. If you have 'defaults' instead of :defaults, then just change it to a symbol and it will do the right thing.

-Rob

Rob Biedenharn [http://agileconsultingllc.com](http://agileconsultingllc.com) Rob@AgileConsultingLLC.com

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [January 8, 2009, 4:47pm UTC](https://discuss.rubyonrails.org/t/error-message/38059/3 "2009-01-08T16:47:20Z")

</div>

Rob Biedenharn wrote:

> If you have 'defaults' instead of :defaults, then just change it to a symbol and it will do the right thing.

That was the issue, I had "defaults" instead of :defaults.

Thanks Rob,

-S
