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

>
> 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}):
> 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
> -- 


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 Biedenharn          http://agileconsultingllc.com
r...@agileconsultingllc.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to