Forum: Ruby on Rails Error during a redirection

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ba3f3da1da9e11f062b85c98de565688?d=identicon&s=25 gael leonet (Guest)
on 2005-12-12 16:09
(Received via mailing list)
Hi,

I have a problem with Rails 0.14.3. I have an application which uses 2
databases : oracle and postgresql. I can connect to the both databases
and use them.

The application works correctly (I can reach the controllers, add
records in the databases without errors) but during or after a
redirection I receive an error. I check with breakpoint and the log, I
see in the log : "Redirected to http://localhost:3000/result" and just
after the error message (with no line of my code in the error message,
just files from rails as actionpack or webrick) :

TypeError in Invoice#index

can't convert String into Integer

RAILS_ROOT : script/../config/..

/usr/local/lib/ruby/gem/1.8/gems/actionpack-1.11.0/lib/action_controller/rescue:75:in
'[]='
/usr/local/lib/ruby/gem/1.8/gems/actionpack-1.11.0/lib/action_controller/rescue:75:in
'rescue_action_locally'
/usr/local/lib/ruby/gem/1.8/gems/actionpack-1.11.0/lib/action_controller/rescue:31:in
'rescue_action'
/usr/local/lib/ruby/gem/1.8/gems/actionpack-1.11.0/lib/action_controller/rescue:108:in
'perform_action'
/usr/local/lib/ruby/gem/1.8/gems/actionpack-1.11.0/lib/action_controller/base.rb:365:
in 'process_without_session_management_support'
/usr/local/lib/ruby/gem/1.8/gems/actionpack-1.11.0/lib/action_controller/session_management.rb:116:in
'process'
....


Did somebody already meet this error or has an idea to solve it ?

Thanks in advance

Gael
34f1b4ea991662f0e4796965bc590910?d=identicon&s=25 =?ISO-8859-1?Q?Gael_L=E9onet?= (Guest)
on 2005-12-14 10:53
(Received via mailing list)
Finally, I found my error.

In my code, I generate a csv and I used an array to store the name of
columns. The name of this array was 'headers'.  I saw that Rails uses
also
an array with the same name. I changed the name of my array and now it
works
well.

Gael

2005/12/12,
This topic is locked and can not be replied to.