# Help debugging an error

**URL:** <https://www.ruby-forum.com/t/help-debugging-an-error/93982>\
**Category:** Rails\
**Created:** [April 17, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/help-debugging-an-error/93982 "2006-04-17T16:40:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Post date:** [April 17, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/help-debugging-an-error/93982/1 "2006-04-17T16:40:19Z")

</div>

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:in `build\_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:in `build\_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:in `each’  
./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:in `request\_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:in `set\_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:in `process’  
./script/…/config/…/vendor/rails/railties/lib/dispatcher.rb:38:in  
`dispatch' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb:115:in `handle\_dispatch’  
./script/…/config/…/vendor/rails/railties/lib/webrick\_server.rb:81: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' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch’  
./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:in `require’  
./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:in `require\_\_’  
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](http://www.smarkets.net)

---

<div class="post-metadata">

**Author:** ![steveoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Post date:** [April 17, 2006, 4:46pm UTC](https://www.ruby-forum.com/t/help-debugging-an-error/93982/2 "2006-04-17T16:46:37Z")

</div>

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](http://127.0.0.1/edit/object/15)

to:

[http://127.0.0.1/edit/object/15#](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](http://www.smarkets.net)

---

<div class="post-metadata">

**Author:** ![steveoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Post date:** [April 17, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/help-debugging-an-error/93982/3 "2006-04-17T16:52:45Z")

</div>

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

Any debugging suggestions?

Thanks,

Steve  
[http://www.smarkets.net](http://www.smarkets.net)

---

<div class="post-metadata">

**Author:** ![steveoco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Post date:** [April 17, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/help-debugging-an-error/93982/4 "2006-04-17T16:58:56Z")

</div>

On 4/17/06, Steve O. [removed\_email\_address@domain.invalid](mailto: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
