Does anyone have advice on how to go about locating the cause of this error message: ActionView::TemplateError (wrong number of arguments (3 for 1)) on line #4 of app/views/products/search.rhtml: 4: <%= start_form_tag :action => ''search'' %> I don''t see anything wrong with line 4 above. Some background: I''ve made a number of changes to Controllers, Layouts, Views and Models in my app so it is going to be very difficult to back track and find where the app started to fail. I''ve a feeling this error is possibly caused by bad formating in my code somewhere. Given this, what is the best approach to finding the bug? thanks -Lindsay -- Posted via http://www.ruby-forum.com/.
Alan Francis
2006-Apr-06 13:15 UTC
[Rails] Re: Advice needed on tracking down unusual error
Lindsay Boyd wrote:> Does anyone have advice on how to go about locating the cause of this > error message: > > ActionView::TemplateError (wrong number of arguments (3 for 1)) on line > #4 of app/views/products/search.rhtml: > 4: <%= start_form_tag :action => ''search'' %> > > I don''t see anything wrong with line 4 above.I''d: 1) look at the HTML source generated if you take the line out, see if you can spot anything weird 2) try :url => { :action => ''search'' }, just in case. Alan -- Posted via http://www.ruby-forum.com/.
Alan Francis
2006-Apr-06 13:16 UTC
[Rails] Re: Advice needed on tracking down unusual error
Alan Francis wrote:> Lindsay Boyd wrote: >> Does anyone have advice on how to go about locating the cause of this >> error message: >> >> ActionView::TemplateError (wrong number of arguments (3 for 1)) on line >> #4 of app/views/products/search.rhtml: >> 4: <%= start_form_tag :action => ''search'' %> >> >> I don''t see anything wrong with line 4 above. > > I''d: > > 1) look at the HTML source generated if you take the line out, see if > you can spot anything weird > > 2) try :url => { :action => ''search'' }, just in case. > > AlanBy take the line out, I actually mean replace it with a literal <form method="post" action="/controller/search"> :-) Alan -- Posted via http://www.ruby-forum.com/.
Lindsay Boyd
2006-Apr-06 13:24 UTC
[Rails] Re: Advice needed on tracking down unusual error
Alan Francis wrote:>replace it with a literal <form method="post" action="/controller/search">Thanks for the advice, Alan. I tried that and now I have: ActionView::TemplateError (wrong number of arguments (2 for 1)) on line #13 of app/views/products/search.rhtml: 10: <center> 11: <p><label for="search">UPC/Tag</label> 12: <%= text_field ''search'', ''search'', :size => ''30'', :maxsize => ''41'' %> 13: <%= submit_tag ''search'' %> So looks like something is badly screwed up! -Lindsay -- Posted via http://www.ruby-forum.com/.
David Thomson
2006-Apr-06 13:26 UTC
[Rails] Re: Advice needed on tracking down unusual error
Should line 12 be: <%= text_field ''search'', ''search'', { :size => ''30'', :maxsize => ''41'' } %> ? HTH David On 06/04/06, Lindsay Boyd <lindsay.boyd@ntlworld.com> wrote:> Alan Francis wrote: > >replace it with a literal <form method="post" action="/controller/search"> > > Thanks for the advice, Alan. I tried that and now I have: > > ActionView::TemplateError (wrong number of arguments (2 for 1)) on line > #13 of app/views/products/search.rhtml: > 10: <center> > 11: <p><label for="search">UPC/Tag</label> > 12: <%= text_field ''search'', ''search'', :size => ''30'', :maxsize => > ''41'' %> > 13: <%= submit_tag ''search'' %> > > So looks like something is badly screwed up! > > -Lindsay > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Lindsay Boyd
2006-Apr-06 13:32 UTC
[Rails] Re: Re: Advice needed on tracking down unusual error
David Thomson wrote:> Should line 12 be: > > <%= text_field ''search'', ''search'', { :size => ''30'', :maxsize => ''41'' } > %> > > ? > > HTH > DavidYes, you''re right - options in {}, but that isn''t causing this error. It''s as though I''ve somehow broken the form methods for my app. - Lindsay -- Posted via http://www.ruby-forum.com/.
I don''t think anything is badly screwed up. I have a theory that there is an unclosed erb line above. Some <%= that never hits a %>... or some <%= function(''stuff'' %> who never hits a parenthesis. Just a theory. -hampton catlin. On 4/6/06, Lindsay Boyd <lindsay.boyd@ntlworld.com> wrote:> > Alan Francis wrote: > >replace it with a literal <form method="post" > action="/controller/search"> > > Thanks for the advice, Alan. I tried that and now I have: > > ActionView::TemplateError (wrong number of arguments (2 for 1)) on line > #13 of app/views/products/search.rhtml: > 10: <center> > 11: <p><label for="search">UPC/Tag</label> > 12: <%= text_field ''search'', ''search'', :size => ''30'', :maxsize => > ''41'' %> > 13: <%= submit_tag ''search'' %> > > So looks like something is badly screwed up! > > -Lindsay > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060406/85929342/attachment.html
Lindsay Boyd
2006-Apr-06 13:37 UTC
[Rails] Re: Advice needed on tracking down unusual error
Alan Francis wrote:>> 2) try :url => { :action => ''search'' }, just in case.Tried this, but still get the same error. -Lindsay -- Posted via http://www.ruby-forum.com/.
Lindsay Boyd
2006-Apr-06 13:38 UTC
[Rails] Re: Re: Advice needed on tracking down unusual error
Hampton wrote:> I don''t think anything is badly screwed up. > > I have a theory that there is an unclosed erb line above. > > Some <%= that never hits a %>... or some <%= function(''stuff'' %> who > never > hits a parenthesis. > > Just a theory. > > -hampton catlin.I think you are right. Is there an easy way to locate this, or do I need to step through the code by hand? -Lindsay -- Posted via http://www.ruby-forum.com/.
Lindsay Boyd
2006-Apr-06 13:44 UTC
[Rails] Re: Re: Advice needed on tracking down unusual error
>Is there an easy way to locate thisI''ve just a grepped | wc -l on the ERB tags: 902 open, 901 closed, so I guess I have to find the extra or missing tag! -Lindsay -- Posted via http://www.ruby-forum.com/.
Hampton
2006-Apr-06 13:49 UTC
[Rails] Re: Re: Advice needed on tracking down unusual error
Ouch! But good work with the unix command! I would say that, knowing processors, it probably is just north of where you are getting that error. -hampton. On 4/6/06, Lindsay Boyd <lindsay.boyd@ntlworld.com> wrote:> > >Is there an easy way to locate this > > I''ve just a grepped | wc -l on the ERB tags: 902 open, 901 closed, so I > guess I have to find the extra or missing tag! > > -Lindsay > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060406/f7158ce9/attachment.html