I''m having an issue in my Prod environment where some sets of Ajax code are not working correctly Going to http://www.jbcmanagement.com/test_case/new# and clicking Add a Step executes the following code: <p><%= link_to_function "Add a Step" do |page| page.insert_html :bottom, :chaka, :partial => ''test_script'', :object => TestScript.new end%><p> In my development environment, this code works correctly, it adds an additional data entry line for an additional test step on the page. In production I am not getting any action. The only indication I see of an error is in my production.log : ActionController::RoutingError (No route matches "/javascripts/effects.js" with {:method=>:get}): effects.js exists in my Project/public/javascripts folder. Here is my routes.rb map.connect '':controller/:action/:id'' map.connect '':controller/:action/:id.:format'' -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sounds like apache or nginx or whatever your frontend is isn''t serving your javascript files correctly Fred Sent from my iPhone On 2 Oct 2008, at 21:52, John Cook <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m having an issue in my Prod environment where some sets of Ajax > code > are not working correctly > > Going to http://www.jbcmanagement.com/test_case/new# and clicking > Add a > Step executes the following code: > > <p><%= link_to_function "Add a Step" do |page| > page.insert_html :bottom, :chaka, :partial => ''test_script'', :object > => > TestScript.new > end%><p> > > In my development environment, this code works correctly, it adds an > additional data entry line for an additional test step on the page. > In production I am not getting any action. > > The only indication I see of an error is in my production.log : > > ActionController::RoutingError (No route matches > "/javascripts/effects.js" with {:method=>:get}): > > > effects.js exists in my Project/public/javascripts folder. > > > Here is my routes.rb > > map.connect '':controller/:action/:id'' > map.connect '':controller/:action/:id.:format'' > -- > Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s weird because if you debug it with Firebug you can see how effects.js is loaded. On Oct 2, 10:56 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Sounds like apache or nginx or whatever your frontend is isn''t serving > your javascript files correctly > > Fred > > Sent from my iPhone > > On 2 Oct 2008, at 21:52, John Cook <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > > > I''m having an issue in my Prod environment where some sets of Ajax > > code > > are not working correctly > > > Going tohttp://www.jbcmanagement.com/test_case/new#and clicking > > Add a > > Step executes the following code: > > > <p><%= link_to_function "Add a Step" do |page| > > page.insert_html :bottom, :chaka, :partial => ''test_script'', :object > > => > > TestScript.new > > end%><p> > > > In my development environment, this code works correctly, it adds an > > additional data entry line for an additional test step on the page. > > In production I am not getting any action. > > > The only indication I see of an error is in my production.log : > > > ActionController::RoutingError (No route matches > > "/javascripts/effects.js" with {:method=>:get}): > > > effects.js exists in my Project/public/javascripts folder. > > > Here is my routes.rb > > > map.connect '':controller/:action/:id'' > > map.connect '':controller/:action/:id.:format'' > > -- > > Posted viahttp://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 2 Oct 2008, at 22:27, Abel wrote:> > That''s weird because if you debug it with Firebug you can see how > effects.js is loaded. >But if you go to http://www.jbcmanagement.com/javascripts/prototype.js then you get an error page instead of the javascript. Your ajax ain''t going to work without that. Fred> On Oct 2, 10:56 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> Sounds like apache or nginx or whatever your frontend is isn''t >> serving >> your javascript files correctly >> >> Fred >> >> Sent from my iPhone >> >> On 2 Oct 2008, at 21:52, John Cook <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >> wrote: >> >> >> >>> I''m having an issue in my Prod environment where some sets of Ajax >>> code >>> are not working correctly >> >>> Going tohttp://www.jbcmanagement.com/test_case/new#and clicking >>> Add a >>> Step executes the following code: >> >>> <p><%= link_to_function "Add a Step" do |page| >>> page.insert_html :bottom, :chaka, :partial => ''test_script'', :object >>> => >>> TestScript.new >>> end%><p> >> >>> In my development environment, this code works correctly, it adds an >>> additional data entry line for an additional test step on the page. >>> In production I am not getting any action. >> >>> The only indication I see of an error is in my production.log : >> >>> ActionController::RoutingError (No route matches >>> "/javascripts/effects.js" with {:method=>:get}): >> >>> effects.js exists in my Project/public/javascripts folder. >> >>> Here is my routes.rb >> >>> map.connect '':controller/:action/:id'' >>> map.connect '':controller/:action/:id.:format'' >>> -- >>> Posted viahttp://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---