Help debugging an error


#1

Hi, I’ve started getting an error I can’t debug. The error doesn’t
generate
anything in my development log. A breakpoint set right at the beggining
of
the controller method does not get triggered. It happens on a form
submission. I can make changes to the object model from with the
console,
but not on this form submission. I thought maybe it was routing, because
I
have routing in place on this method, but if I go to the unrouted url, I
still get the same error message.

So, on a form submission, I get the following error: (it is not the
regular
rails error message, but a un-formatted error message)

cannot convert String into Integer
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:214:in
[]' ./script/../config/../vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:214:inbuild_deep_hash’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:214:in
build_deep_hash' ./script/../config/../vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:214:inbuild_deep_hash’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:54:in
parse_request_parameters' ./script/../config/../vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:47:ineach’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:47:in
parse_request_parameters' ./script/../config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:70:inrequest_parameters’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/request.rb:12:in
parameters' ./script/../config/../vendor/rails/actionpack/lib/action_controller/session_management.rb:122:inset_session_options_without_components’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/components.rb:178:in
set_session_options' ./script/../config/../vendor/rails/actionpack/lib/action_controller/session_management.rb:116:inprocess’
./script/…/config/…/vendor/rails/railties/lib/dispatcher.rb:38:in
dispatch' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb:115:inhandle_dispatch’
./script/…/config/…/vendor/rails/railties/lib/webrick_server.rb:81:in
service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:ineach’
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:instart’
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in start' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb:67:indispatch’
./script/…/config/…/vendor/rails/railties/lib/commands/servers/webrick.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:inrequire’
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:149:in
require' ./script/../config/../vendor/rails/railties/lib/commands/server.rb:34 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:inrequire__’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require’
script/server:5

I can’t seem to trace it down. Any help is most appreciated.

Thanks,

Steve
http://www.smarkets.net


#2

I think I may have figured this one out. I am using some ajax on this
form
where you can click on “edit” and it displays an editible view of the
object. I changed the way I was linking to this editable view which has
resulted in now when you click on edit, the url switches from:

http://127.0.0.1/edit/object/15

to:

http://127.0.0.1/edit/object/15#

That # at the end I believe is why I getting the string into integer
error.

So I’ll figure out how to make it not add the # to the end of the URL
when
clicking on the edit button, and that should fix it.

Steve
http://www.smarkets.net


#3

Unfortunately, that was not it. I created a non-ajax edit form, and same
problem.

Any debugging suggestions?

Thanks,

Steve
http://www.smarkets.net


#4

On 4/17/06, Steve O. removed_email_address@domain.invalid wrote:

Unfortunately, that was not it. I created a non-ajax edit form, and same
problem.

Any debugging suggestions?

“view source” to double-check that what you expect to have in the form
is there. Then hook up an HTTP tracing proxy like Fiddler, or
whatever runs on your system and look at what is really being sent to
your app.

– James