# Error message

**URL:** <https://www.ruby-forum.com/t/error-message/157151>\
**Category:** Rails\
**Created:** [January 7, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/error-message/157151 "2009-01-07T22:53:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [January 7, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/error-message/157151/1 "2009-01-07T22: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}):  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/routing/recognition\_optimisation.rb:67:in  
`recognize_path' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/route_set.rb:384:in`recognize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/dispatcher.rb:148:in  
`handle_request' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in`dispatch’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/dispatcher.rb:104:in  
`synchronize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in`dispatch’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/dispatcher.rb:120:in  
`dispatch_cgi' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in`dispatch’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/…/lib/mongrel/rails.rb:76:in  
`process' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in`synchronize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/…/lib/mongrel/rails.rb:74:in  
`process' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in`process\_client’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in  
`each' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in`process\_client’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in`initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in  
`new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in  
`initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in`new’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in  
`each' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel\_rails:128:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel\_rails:281  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:502:in  
`load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in`load’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:354:in  
`new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in`load’  
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in  
`require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in`new\_constants\_in’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in  
`require' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' ./script/server:3 -e:2:in`load’  
-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:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [January 7, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/error-message/157151/2 "2009-01-07T23:12:40Z")

</div>

On Jan 7, 2009, at 4:53 PM, Shandy N. wrote:

> is visited it is throwing some kind of error:  
> 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

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:

# These directories should always be served up by Apache, since

they contain static content. Or just let rails do it.  
ProxyPass /images !  
ProxyPass /stylesheets !  
ProxyPass /javascripts !  
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:  
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 B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [January 8, 2009, 5:47pm UTC](https://www.ruby-forum.com/t/error-message/157151/3 "2009-01-08T17:47:20Z")

</div>

Rob B. 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
