I have a feeling I''m missing something *really* plain. If anyone can help, it''s surely appreciated. I''ve got a route like this: map.edit_area "site/edit_section/:id", :controller => ''site'', :action => ''edit_section'' And a remote call like this: <%= link_to_remote "Edit Section", { :update => ''section'', :url => edit_section_url(:id => @current_element.id) }, { ''class'' => ''element_left'' } %> Okay. This works fine in Internet Explorer. Ugh. It is *not* working with Firefox, however. The ''section'' is replaced not by the ''edit_section'' template, as with Explorer, but instead with: Not Found `/site/edit_section/23'' not found. WEBrick/1.3.1 (Ruby/1.8.2/2004-12-25) at localhost:3000 Ouch. I''m using Rails 14.1, and everything else is working fine. The required prototype library is included in the appropriate layout file. Like I said, it''s fine in Explorer. What am I missing? Yah! Thanks in advance for any insight, Greg
Okay, when the request comes from IE, we get a nice log message: 127.0.0.1 - - [21/Oct/2005:01:09:48 Pacific Daylight Time] "POST /site/edit_area/23 HTTP/1.1" 200 563 http://localhost:3000/site/show/4/23?page=1 -> /site/edit_area/23 But when from Firefox, we get ugliness. Why is a nil object being detected? Any tips on how to track down from where?: #<NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.include?> ["C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_ext/cgi_methods.rb:48:in `parse_request_par ameters''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_ext/cgi_methods.rb:46:in `each''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_ext/cgi_methods.rb:46:in `parse_request_par ameters''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_process.rb:69:in `request_paramet ers''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/request.rb:8:in `parameters''", "C:/ruby/l ib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/session_management.rb:114:in `process''", "C:/ruby/lib/ruby /gems/1.8/gems/actionpack-1.10.1/lib/action_controller/rescue.rb:20:in `process_with_exception''", "C:/ruby/lib/ruby/gems /1.8/gems/rails-0.14.1/lib/dispatcher.rb:38:in `dispatch''", "C:/ruby/lib/ruby/gems/1.8/gems/rails-0.14.1/lib/webrick_ser ver.rb:117:in `handle_dispatch''", "C:/ruby/lib/ruby/gems/1.8/gems/rails-0.14.1/lib/webrick_server.rb:83:in `service''", " C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service''", "C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start''", "C:/ruby /lib/ruby/1.8/webrick/server.rb:79:in `start''", "C:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''", "C:/ruby/lib/rub y/gems/1.8/gems/rails-0.14.1/lib/webrick_server.rb:69:in `dispatch''", "C:/ruby/lib/ruby/gems/1.8/gems/rails-0.14.1/lib/c ommands/server.rb:59", "C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__''", "C:/ruby/lib/ruby/ site_ruby/1.8/rubygems/custom_require.rb:18:in `require''", "C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.1/lib/activ e_support/dependencies.rb:213:in `require''", "script/server:3"] [2005-10-21 01:10:16] ERROR `/site/edit_area/23'' not found. 127.0.0.1 - - [21/Oct/2005:01:10:15 Pacific Daylight Time] "POST /site/edit_area/23 HTTP/1.1" 404 287 - -> /site/edit_area/23
I think your edit_section_url should be edit_area_url, since your route is called map.edit_area. Alternatively, you could change your route to be called map.edit_section. Tom On 10/21/05, Greg McClure <gmcclure-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Okay, when the request comes from IE, we get a nice log message: > > 127.0.0.1 - - [21/Oct/2005:01:09:48 Pacific Daylight Time] "POST > /site/edit_area/23 HTTP/1.1" 200 563 > http://localhost:3000/site/show/4/23?page=1 -> /site/edit_area/23 > > But when from Firefox, we get ugliness. Why is a nil object being > detected? Any tips on how to track down from where?: > > #<NoMethodError: You have a nil object when you didn''t expect it! > You might have expected an instance of Array. > The error occured while evaluating nil.include?> > ["C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_ext/cgi_methods.rb:48:in > `parse_request_par > ameters''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_ext/cgi_methods.rb:46:in > `each''", > "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_ext/cgi_methods.rb:46:in > `parse_request_par > ameters''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/cgi_process.rb:69:in > `request_paramet > ers''", "C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/request.rb:8:in > `parameters''", "C:/ruby/l > ib/ruby/gems/1.8/gems/actionpack-1.10.1/lib/action_controller/session_management.rb:114:in > `process''", "C:/ruby/lib/ruby > /gems/1.8/gems/actionpack-1.10.1/lib/action_controller/rescue.rb:20:in > `process_with_exception''", "C:/ruby/lib/ruby/gems > /1.8/gems/rails-0.14.1/lib/dispatcher.rb:38:in `dispatch''", > "C:/ruby/lib/ruby/gems/1.8/gems/rails-0.14.1/lib/webrick_ser > ver.rb:117:in `handle_dispatch''", > "C:/ruby/lib/ruby/gems/1.8/gems/rails-0.14.1/lib/webrick_server.rb:83:in > `service''", " > C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service''", > "C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start''", "C:/ruby > /lib/ruby/1.8/webrick/server.rb:79:in `start''", > "C:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''", > "C:/ruby/lib/rub > y/gems/1.8/gems/rails-0.14.1/lib/webrick_server.rb:69:in `dispatch''", > "C:/ruby/lib/ruby/gems/1.8/gems/rails-0.14.1/lib/c > ommands/server.rb:59", > "C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__''", "C:/ruby/lib/ruby/ > site_ruby/1.8/rubygems/custom_require.rb:18:in `require''", > "C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.1/lib/activ > e_support/dependencies.rb:213:in `require''", "script/server:3"] > [2005-10-21 01:10:16] ERROR `/site/edit_area/23'' not found. > 127.0.0.1 - - [21/Oct/2005:01:10:15 Pacific Daylight Time] "POST > /site/edit_area/23 HTTP/1.1" 404 287 > - -> /site/edit_area/23 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Uh, good catch, but that''s not the problem. What you''re seeing is just the result of me playing with the code and renaming a few things. In any event, the problem is still the same, it works fine on Explorer and tanks on Firefox ... Very confused ... If anyone has any ideas, PLEASE, let me know ...
I think it''s a bug in Rails. I ran into the same problem, reverted to 0.13.1, and all is well again.
Hey Victor, I tracked my problem to using a the first beta of Firefox 1.5. After I installed 1.5 beta 2, everything was copasetic. You''re right, something''s not playing fair, either with Rails or Firefox, but the switch fixed it. It would be interesting if you''re having the same issue. Peace, Greg On 10/27/05, Victor Cosby <victorcosby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think it''s a bug in Rails. I ran into the same problem, reverted to 0.13.1, > and all is well again. > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >