Michael Coker
2008-Jan-24 21:51 UTC
NoMethodError (undefined method `to_sym'' for {"6"=>"1"}:Hash
I''ve got a search form that was working on rails 1.2.6, but since upgrading to 2.0.2, I''m getting this error when I post my form. Here''s the full error: Processing SearchController#results (for 24.173.26.226 at 2008-01-24 14:51:23) [GET] Session ID: BAh7CDoTc2hvd1RodW1ibmFpbHMiBjE6CXVzZXJvOglVc2VyBzoWQGF0dHJp%0AYnV0ZXNfY2FjaGV7ADoQQGF0dHJpYnV0ZXN7DCIJbmFtZSITRG91ZyBKb2hu%0Ac3RvbmUiDWNhdGVnb3J5Ig5zdXBlcnVzZXIiB2lkIgYyIg1wYXNzd29yZCIN%0AcEBzc3dvcmQiCmVtYWlsIiNkam9obnN0b25lQHByb3ZpbmNldG93bi1tYS5n%0Ab3YiC2FjdGl2ZSIGMSIPY3JlYXRlZF9hdCIYMjAwOC0wMS0yMyAxMzozNToz%0AOCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFz%0AaHsABjoKQHVzZWR7AA%3D%3D--ec73422aae883d2a819f7c304ecc59ed347e3337 Parameters: {"format"=>{"6"=>"1"}, "collection"=>{"5"=>"1"}, "search"=>{"form"=>"advancedsearch", "keyword"=>"oil"}, "x"=>"17", "y"=>"13", "action"=>"results", "controller"=>"search"} NoMethodError (undefined method `to_sym'' for {"6"=>"1"}:HashWithIndifferentAccess): /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:420:in `template_format'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:396:in `pick_template_extension'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1259:in `template_exempt_from_layout?'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:278:in `apply_layout?'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:256:in `render_without_benchmark'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1153:in `default_render'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1159:in `perform_action_without_filters'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'' /usr/lib64/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'' /usr/lib64/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/rails.rb:76:in `process'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/rails.rb:74:in `synchronize'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/rails.rb:74:in `process'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:159:in `process_client'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:158:in `each'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:158:in `process_client'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `initialize'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `new'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:285:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:268:in `initialize'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:268:in `new'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:268:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/configurator.rb:282:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/configurator.rb:281:in `each'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/configurator.rb:281:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/command.rb:212:in `run'' /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load'' /usr/bin/mongrel_rails:19 -- 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 -~----------~----~----~----~------~----~------~--~---
Eduard Martini
2008-Mar-05 10:42 UTC
Re: NoMethodError (undefined method `to_sym'' for {"6"=>"1"}:
Michael Coker wrote:> Parameters: {"<b>format</b>"=>{"6"=>"1"}, "collection"=>{"5"=>"1"}, > "search"=>{"form"=>"advancedsearch", "keyword"=>"oil"}, "x"=>"17", > "y"=>"13", "action"=>"results", "controller"=>"search"}Change the name of that parameter and it will work. -- 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 -~----------~----~----~----~------~----~------~--~---
Apparently Analagous Threads
- undefined method `to_sym' for nil:NilClass
- NoMethodError : undefined method `stringify_keys!' for "2":String
- can't update my data base using "update_attributes"
- Why would ActiveRecord connect to Postgres as root?
- Deploying to a staging server using Capistrano: how to start up BackgrounDRb?