in the header of my layout I use the following helper <%= javascript_include_tag ''accordion.js'', ''application.js'' %> but I get an error when running Processing ApplicationController#index (for 127.0.0.1 at 2009-08-22 23:18:47) [GET] Parameters: {"1249998180"=>nil} ActionController::RoutingError (No route matches "/javascripts/ accordion.js" with {:method=>:get}): my javascript file is in public/javascripts/accordion.js seems that the helper is not generating tehe correct path w /public/ javascripts/accordion.js is it right ? thanks fyi
Where in the source is your javascript_include_tag and how does the actual source look? On Aug 22, 2:27 pm, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote:> in the header of my layout I use the following helper > > <%= javascript_include_tag ''accordion.js'', ''application.js'' %> > > but I get an error when running > > Processing ApplicationController#index (for 127.0.0.1 at 2009-08-22 > 23:18:47) [GET] > Parameters: {"1249998180"=>nil} > ActionController::RoutingError (No route matches "/javascripts/ > accordion.js" with {:method=>:get}): > > my javascript file is in public/javascripts/accordion.js > > seems that the helper is not generating tehe correct path w /public/ > javascripts/accordion.js > > is it right ? > > thanks fyi
here is my layout.html.erb <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <HEAD> <TITLE>Home</TITLE> <%= javascript_include_tag ''accordion.js'', ''application.js'' %> ... </HEAD> ... generated <script type="text/javascript" src="/academy/javascripts/ accordion.js?1249998180"/> .. I use a sub-uri : config.action_controller.relative_url_root = "/academy" the generated code should be : ??? <script type="text/javascript" src="/academy/public/javascripts/ accordion.js?1249998180"/> On 22 août, 23:55, heimdull <fre...-RCI/mp9mI1I6GGFevw1D/A@public.gmane.org> wrote:> Where in the source is your javascript_include_tag and how does the > actual source look? > > On Aug 22, 2:27 pm, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > > in the header of my layout I use the following helper > > > <%= javascript_include_tag ''accordion.js'', ''application.js'' %> > > > but I get an error when running > > > Processing ApplicationController#index (for 127.0.0.1 at 2009-08-22 > > 23:18:47) [GET] > > Parameters: {"1249998180"=>nil} > > ActionController::RoutingError (No route matches "/javascripts/ > > accordion.js" with {:method=>:get}): > > > my javascript file is in public/javascripts/accordion.js > > > seems that the helper is not generating tehe correct path w /public/ > > javascripts/accordion.js > > > is it right ? > > > thanks fyi
I think it''s an environment description issue when being in development mode, w mongrel , I should not mention the sub-uri, so it goes directly to htp://localhost:3000/ if I test with Apache mod-rails I should mention the sub-uri AND the asset host I''ll test it thanks On 22 août, 23:55, heimdull <fre...-RCI/mp9mI1I6GGFevw1D/A@public.gmane.org> wrote:> Where in the source is your javascript_include_tag and how does the > actual source look? > > On Aug 22, 2:27 pm, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > > in the header of my layout I use the following helper > > > <%= javascript_include_tag ''accordion.js'', ''application.js'' %> > > > but I get an error when running > > > Processing ApplicationController#index (for 127.0.0.1 at 2009-08-22 > > 23:18:47) [GET] > > Parameters: {"1249998180"=>nil} > > ActionController::RoutingError (No route matches "/javascripts/ > > accordion.js" with {:method=>:get}): > > > my javascript file is in public/javascripts/accordion.js > > > seems that the helper is not generating tehe correct path w /public/ > > javascripts/accordion.js > > > is it right ? > > > thanks fyi