jackster.mobi
2008-Jan-22  20:04 UTC
Wrong Number of Arguments 0 for 3 when calling partial
I''m hoping someone can help me solve this problem which I believe has to do with my initial configuration of Rails on my server since the simplest of code which calls a partial works on one server but not another. in ROOT_RAILS/view/test/_trap.rhtml: Hello World in ROOT_RAILS/view/index.rhtml <%= render :partial => ''trap'' %> Does anyone have any ideas what Rails is looking for here or why I continue to get this error? thanks jackster.mobi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Jan-22  23:51 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
Can you give us the backtrace to this error please? On Jan 23, 2008 6:34 AM, jackster.mobi <johnsheahan-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> > I''m hoping someone can help me solve this problem which I believe has > to do with my initial configuration of Rails on my server since the > simplest of code which calls a partial works on one server but not > another. > > in ROOT_RAILS/view/test/_trap.rhtml: > > Hello World > > in ROOT_RAILS/view/index.rhtml > > <%= render :partial => ''trap'' %> > > > Does anyone have any ideas what Rails is looking for here or why I > continue to get this error? > > thanks > > jackster.mobi > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jackster.mobi
2008-Jan-23  19:34 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
Sure thing Ryan...thanks for kicking this around with me. I''m at the
point where I''m thinking I need to blow away my Rails install and
start from scratch. Here is the error from the log:
ActionView::TemplateError (wrong number of arguments (0 for 3)) on
line #3 of trap/js.rhtml:
1: <%= periodically_call_remote( :update => "status",:frequency
=>
2, :url => { :action => :update_data }) %>
2: <div id="status">
3: <%= render :partial => ''trap'', :collection =>
@trap %>
4: </div>
5: <% for trap in @trap %>
6: <%= trap.ipadd %>
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:115:in `logger''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:115:in `render_partial''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:143:in `render_partial_collection''
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/inflector.rb:257:in `each_with_index''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:141:in `each''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:141:in `each_with_index''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:141:in `render_partial_collection''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:350:in `render''
    app/views/trap/js.rhtml:3:in
`_run_erb_47app47views47trap47js46rhtml''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:637:in `send''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:637:in `compile_and_render_template''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:365:in `render_template''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:316:in `render_file''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1100:in `render_for_file''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:836:in `render_with_no_layout''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/layout.rb:262:in `render_without_benchmark''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:51:in `render''
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:51:in `render''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1153:in `default_render''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1159:in `perform_action_without_filters''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:697:in `call_filters''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:689:in `perform_action_without_benchmark''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/rescue.rb:199:in `perform_action_without_caching''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:678:in `perform_action''
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/connection_adapters/abstract/query_cache.rb:33:in
`cache''
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
active_record/query_cache.rb:8:in `cache''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in `perform_action''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `send''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `process_without_filters''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
`process_without_session_management_support''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in `process''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in `process''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in `handle_request''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in `dispatch''
--------I cut it off here but it goes on a bit further.
thanks
jackster
On Jan 22, 6:51 pm, "Ryan Bigg"
<radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Can you give us the backtrace to this error please?
>
> On Jan 23, 2008 6:34 AM, jackster.mobi
<johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:
>
>
>
>
>
>
>
> > I''m hoping someone can help me solve this problem which I
believe has
> > to do with my initial configuration of Rails on my server since the
> > simplest of code which calls a partial works on one server but not
> > another.
>
> > in ROOT_RAILS/view/test/_trap.rhtml:
>
> >   Hello World
>
> > in ROOT_RAILS/view/index.rhtml
>
> >   <%= render :partial => ''trap'' %>
>
> > Does anyone have any ideas what Rails is looking for here or why I
> > continue to get this error?
>
> > thanks
>
> > jackster.mobi
>
> --
> Ryan Bigghttp://www.frozenplague.net
> Feel free to add me to MSN and/or GTalk as this email.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Jan-23  23:22 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
Can you show us the code of the partial as well? On Jan 24, 2008 6:04 AM, jackster.mobi <johnsheahan-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> > Sure thing Ryan...thanks for kicking this around with me. I''m at the > point where I''m thinking I need to blow away my Rails install and > start from scratch. Here is the error from the log: > > ActionView::TemplateError (wrong number of arguments (0 for 3)) on > line #3 of trap/js.rhtml: > 1: <%= periodically_call_remote( :update => "status",:frequency => > 2, :url => { :action => :update_data }) %> > 2: <div id="status"> > 3: <%= render :partial => ''trap'', :collection => @trap %> > 4: </div> > 5: <% for trap in @trap %> > 6: <%= trap.ipadd %> > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:115:in `logger'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:115:in `render_partial'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:143:in `render_partial_collection'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/inflector.rb:257:in `each_with_index'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:141:in `each'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:141:in `each_with_index'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:141:in `render_partial_collection'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:350:in `render'' > app/views/trap/js.rhtml:3:in > `_run_erb_47app47views47trap47js46rhtml'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:637:in `send'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:637:in `compile_and_render_template'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:365:in `render_template'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:316:in `render_file'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:1100:in `render_for_file'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:836:in `render_with_no_layout'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/layout.rb:262:in `render_without_benchmark'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/benchmarking.rb:51:in `render'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/benchmarking.rb:51:in `render'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:1153:in `default_render'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:1159:in `perform_action_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/filters.rb:697:in `call_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/filters.rb:689:in `perform_action_without_benchmark'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/rescue.rb:199:in `perform_action_without_caching'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/caching.rb:678:in `perform_action'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ > active_record/connection_adapters/abstract/query_cache.rb:33:in > `cache'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ > active_record/query_cache.rb:8:in `cache'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/caching.rb:677:in `perform_action'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:524:in `send'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:524:in `process_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/filters.rb:685:in > `process_without_session_management_support'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/session_management.rb:123:in `process'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:388:in `process'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/dispatcher.rb:171:in `handle_request'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/dispatcher.rb:115:in `dispatch'' > --------I cut it off here but it goes on a bit further. > > thanks > > jackster > > > > On Jan 22, 6:51pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Can you give us the backtrace to this error please? > > > > On Jan 23, 2008 6:34 AM, jackster.mobi <johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote: > > > > > > > > > > > > > > > > > I''m hoping someone can help me solve this problem which I believe has > > > to do with my initial configuration of Rails on my server since the > > > simplest of code which calls a partial works on one server but not > > > another. > > > > > in ROOT_RAILS/view/test/_trap.rhtml: > > > > > Hello World > > > > > in ROOT_RAILS/view/index.rhtml > > > > > <%= render :partial => ''trap'' %> > > > > > Does anyone have any ideas what Rails is looking for here or why I > > > continue to get this error? > > > > > thanks > > > > > jackster.mobi > > > > -- > > Ryan Bigghttp://www.frozenplague.net > > Feel free to add me to MSN and/or GTalk as this email.- Hide quoted text > - > > > > - Show quoted text - > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jackster.mobi
2008-Jan-24  02:22 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
Hi Ryan...you''re a great man to go this far into my problem....I
appreciate it.
I made the code as simple as possible which should make this easier to
troubleshoot.
test_it controller:
   def jackster
   end
RAILS_ROOT/views/test_it/jackster.rhtml:
   <%= render :partial => ''sample'' %>
RAILS_ROOT/views/test_it/_sample.rhtml:
   Hello World
production log:
Processing TestItController#jackster (for 172.21.80.102 at 2008-01-23
21:15:39) [GET]
  Session ID:
BAh7CDoOcmV0dXJuX3RvMDoJdXNlcmkNIgpmbGFzaElDOidBY3Rpb25Db250%0Acm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNl
ZHsA--a9910396813648d89e0a03f35b0b15d8c1122330
  Parameters: {"action"=>"jackster",
"controller"=>"test_it"}
Rendering template within layouts/test_it
Rendering test_it/jackster
ActionView::TemplateError (wrong number of arguments (0 for 3)) on
line #1 of test_it/jackster.rhtml:
1: <%= render :partial => ''sample'' %>
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:115:in `logger''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb:115:in `render_partial''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:352:in `render''
    app/views/test_it/jackster.rhtml:1:in
`_run_erb_47app47views47test_it47jackster46rhtml''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:637:in `send''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:637:in
`compile_and_render_template''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:365:in `render_template''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
base.rb:316:in `render_file''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1100:in
`render_for_file''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:836:in
`render_with_no_layout''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/layout.rb:262:in
`render_without_benchmark''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:51:in `render''
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/benchmarking.rb:51:in `render''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1153:in
`default_render''
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:1159:in `perform_act
....whadaya think?
jackster
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Jan-24  03:12 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
Try renaming the controller to something else other than having "Test" in its name. On Jan 24, 2008 12:52 PM, jackster.mobi <johnsheahan-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> > Hi Ryan...you''re a great man to go this far into my problem....I > appreciate it. > > I made the code as simple as possible which should make this easier to > troubleshoot. > > test_it controller: > def jackster > end > > RAILS_ROOT/views/test_it/jackster.rhtml: > <%= render :partial => ''sample'' %> > > > RAILS_ROOT/views/test_it/_sample.rhtml: > Hello World > > > production log: > Processing TestItController#jackster (for 172.21.80.102 at 2008-01-23 > 21:15:39) [GET] > Session ID: > > > BAh7CDoOcmV0dXJuX3RvMDoJdXNlcmkNIgpmbGFzaElDOidBY3Rpb25Db250%0Acm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNl > > ZHsA--a9910396813648d89e0a03f35b0b15d8c1122330 > Parameters: {"action"=>"jackster", "controller"=>"test_it"} > Rendering template within layouts/test_it > Rendering test_it/jackster > > > ActionView::TemplateError (wrong number of arguments (0 for 3)) on > line #1 of test_it/jackster.rhtml: > 1: <%= render :partial => ''sample'' %> > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:115:in `logger'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > partials.rb:115:in `render_partial'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:352:in `render'' > app/views/test_it/jackster.rhtml:1:in > `_run_erb_47app47views47test_it47jackster46rhtml'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:637:in `send'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:637:in > > `compile_and_render_template'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:365:in `render_template'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > base.rb:316:in `render_file'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:1100:in > > `render_for_file'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:836:in > > `render_with_no_layout'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/layout.rb:262:in > > `render_without_benchmark'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/benchmarking.rb:51:in `render'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/benchmarking.rb:51:in `render'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:1153:in > > `default_render'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > action_controller/base.rb:1159:in `perform_act > > ....whadaya think? > > jackster > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jackster.mobi
2008-Jan-24  15:59 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
It makes no difference if I rename the controller or setup the same configuration in a different controller. I am going to dig through the partial.rb, specifically line 115 that is being flagged by the error message to see if I can determine why that script is erroring. I will post my findings thanks jackster On Jan 23, 6:22 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can you show us the code of the partial as well? > > On Jan 24, 2008 6:04 AM, jackster.mobi <johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote: > > > > > Sure thing Ryan...thanks for kicking this around with me. I''m at the > > point where I''m thinking I need to blow away my Rails install and > > start from scratch. Here is the error from the log: > > > ActionView::TemplateError (wrong number of arguments (0 for 3)) on > > line #3 of trap/js.rhtml: > > 1: <%= periodically_call_remote( :update => "status",:frequency => > > 2, :url => { :action => :update_data }) %> > > 2: <div id="status"> > > 3: <%= render :partial => ''trap'', :collection => @trap %> > > 4: </div> > > 5: <% for trap in @trap %> > > 6: <%= trap.ipadd %> > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > partials.rb:115:in `logger'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > partials.rb:115:in `render_partial'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > partials.rb:143:in `render_partial_collection'' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > > active_support/inflector.rb:257:in `each_with_index'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > partials.rb:141:in `each'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > partials.rb:141:in `each_with_index'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > partials.rb:141:in `render_partial_collection'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > base.rb:350:in `render'' > > app/views/trap/js.rhtml:3:in > > `_run_erb_47app47views47trap47js46rhtml'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > base.rb:637:in `send'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > base.rb:637:in `compile_and_render_template'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > base.rb:365:in `render_template'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/ > > base.rb:316:in `render_file'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:1100:in `render_for_file'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:836:in `render_with_no_layout'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/layout.rb:262:in `render_without_benchmark'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/benchmarking.rb:51:in `render'' > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/benchmarking.rb:51:in `render'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:1153:in `default_render'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:1159:in `perform_action_without_filters'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/filters.rb:697:in `call_filters'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/filters.rb:689:in `perform_action_without_benchmark'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/benchmarking.rb:68:in > > `perform_action_without_rescue'' > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/benchmarking.rb:68:in > > `perform_action_without_rescue'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/rescue.rb:199:in `perform_action_without_caching'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/caching.rb:678:in `perform_action'' > > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ > > active_record/connection_adapters/abstract/query_cache.rb:33:in > > `cache'' > > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ > > active_record/query_cache.rb:8:in `cache'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/caching.rb:677:in `perform_action'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:524:in `send'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:524:in `process_without_filters'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/filters.rb:685:in > > `process_without_session_management_support'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/session_management.rb:123:in `process'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/base.rb:388:in `process'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/dispatcher.rb:171:in `handle_request'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ > > action_controller/dispatcher.rb:115:in `dispatch'' > > --------I cut it off here but it goes on a bit further. > > > thanks > > > jackster > > > On Jan 22, 6:51pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Can you give us the backtrace to this error please? > > > > On Jan 23, 2008 6:34 AM, jackster.mobi <johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote: > > > > > I''m hoping someone can help me solve this problem which I believe has > > > > to do with my initial configuration of Rails on my server since the > > > > simplest of code which calls a partial works on one server but not > > > > another. > > > > > in ROOT_RAILS/view/test/_trap.rhtml: > > > > > Hello World > > > > > in ROOT_RAILS/view/index.rhtml > > > > > <%= render :partial => ''trap'' %> > > > > > Does anyone have any ideas what Rails is looking for here or why I > > > > continue to get this error? > > > > > thanks > > > > > jackster.mobi > > > > -- > > > Ryan Bigghttp://www.frozenplague.net > > > Feel free to add me to MSN and/or GTalk as this email.- Hide quoted text > > - > > > > - Show quoted text - > > -- > Ryan Bigghttp://www.frozenplague.net > Feel free to add me to MSN and/or GTalk as this email.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jackster.mobi
2008-Jan-24  20:01 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
The error message: Wrong number of arguments (0 for 3) which I showed
previously points to line 115 on the following file:
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
partials.rb
Here is the code from that file, is there any way to tell what
arguments it''s looking for?
thanks jackster
# As you can see, the :locals hash is shared between both the partial
and its layout.
  module Partials
    private
      def render_partial(partial_path, object_assigns = nil,
local_assigns = nil) #:nodoc:
        case partial_path
        when String, Symbol, NilClass
          path, partial_name = partial_pieces(partial_path)
          object = extracting_object(partial_name, object_assigns)
          local_assigns = local_assigns ? local_assigns.clone : {}
          add_counter_to_local_assigns!(partial_name, local_assigns)
          add_object_to_local_assigns!(partial_name, local_assigns,
object)
line 115=>   if logger && logger.debug?
            ActionController::Base.benchmark("Rendered #{path}/
_#{partial_name}",         Logger::DEBUG, false) do
              render("#{path}/_#{partial_name}", local_assigns)
            end
          else
            render("#{path}/_#{partial_name}", local_assigns)
          end
On Jan 24, 10:59 am, "jackster.mobi"
<johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org>
wrote:> It makes no difference if I rename the controller or setup the same
> configuration in a different controller.
>
> I am going to dig through the partial.rb, specifically line 115 that
> is being flagged by the error message to see if I can determine why
> that script is erroring.
>
> I will post my findings
>
> thanks
>
> jackster
>
> On Jan 23, 6:22 pm, "Ryan Bigg"
<radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>
>
> > Can you show us the code of the partial as well?
>
> > On Jan 24, 2008 6:04 AM, jackster.mobi
<johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:
>
> > > Sure thing Ryan...thanks for kicking this around with me.
I''m at the
> > > point where I''m thinking I need to blow away my Rails
install and
> > > start from scratch. Here is the error from the log:
>
> > > ActionView::TemplateError (wrong number of arguments (0for3)) on
> > > line #3of trap/js.rhtml:
> > > 1: <%= periodically_call_remote( :update =>
"status",:frequency =>
> > > 2, :url => { :action => :update_data }) %>
> > > 2: <div id="status">
> > >3: <%= render :partial => ''trap'',
:collection => @trap %>
> > > 4: </div>
> > > 5: <% for trap in @trap %>
> > > 6: <%= trap.ipadd %>
>
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > partials.rb:115:in `logger''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > partials.rb:115:in `render_partial''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > partials.rb:143:in `render_partial_collection''
> > >    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
> > > active_support/inflector.rb:257:in `each_with_index''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > partials.rb:141:in `each''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > partials.rb:141:in `each_with_index''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > partials.rb:141:in `render_partial_collection''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > base.rb:350:in `render''
> > >    app/views/trap/js.rhtml:3:in
> > > `_run_erb_47app47views47trap47js46rhtml''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > base.rb:637:in `send''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > base.rb:637:in `compile_and_render_template''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > base.rb:365:in `render_template''
> > >  
 /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/
> > > base.rb:316:in `render_file''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:1100:in `render_for_file''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:836:in `render_with_no_layout''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/layout.rb:262:in
`render_without_benchmark''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/benchmarking.rb:51:in `render''
> > >    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/benchmarking.rb:51:in `render''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:1153:in `default_render''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:1159:in
`perform_action_without_filters''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/filters.rb:697:in `call_filters''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/filters.rb:689:in
`perform_action_without_benchmark''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/benchmarking.rb:68:in
> > > `perform_action_without_rescue''
> > >    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/benchmarking.rb:68:in
> > > `perform_action_without_rescue''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/rescue.rb:199:in
`perform_action_without_caching''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/caching.rb:678:in `perform_action''
> > >    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
> > > active_record/connection_adapters/abstract/query_cache.rb:33:in
> > > `cache''
> > >    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
> > > active_record/query_cache.rb:8:in `cache''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/caching.rb:677:in `perform_action''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:524:in `send''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:524:in
`process_without_filters''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/filters.rb:685:in
> > > `process_without_session_management_support''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/session_management.rb:123:in `process''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/base.rb:388:in `process''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/dispatcher.rb:171:in `handle_request''
> > >    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
> > > action_controller/dispatcher.rb:115:in `dispatch''
> > > --------I cut it off here but it goes on a bit further.
>
> > > thanks
>
> > > jackster
>
> > > On Jan 22, 6:51pm, "Ryan Bigg"
<radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > Can you give us the backtrace to this error please?
>
> > > > On Jan 23, 2008 6:34 AM, jackster.mobi
<johnshea...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:
>
> > > > > I''m hoping someone can help me solve this
problem which I believe has
> > > > > to do with my initial configuration of Rails on my
server since the
> > > > > simplest of code which calls a partial works on one
server but not
> > > > > another.
>
> > > > > in ROOT_RAILS/view/test/_trap.rhtml:
>
> > > > > Hello World
>
> > > > > in ROOT_RAILS/view/index.rhtml
>
> > > > > <%= render :partial => ''trap''
%>
>
> > > > > Does anyone have any ideas what Rails is looking for
here or why I
> > > > > continue to get this error?
>
> > > > > thanks
>
> > > > > jackster.mobi
>
> > > > --
> > > > Ryan Bigghttp://www.frozenplague.net
> > > > Feel free to add me to MSN and/or GTalk as this email.- Hide
quoted text
> > > -
>
> > > > - Show quoted text -
>
> > --
> > Ryan Bigghttp://www.frozenplague.net
> > Feel free to add me to MSN and/or GTalk as this email.- Hide quoted
text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Keynan Pratt
2008-Jan-24  21:10 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
RAILS_ROOT/app/views/test_it/jackster.rhtml not RAILS_ROOT/views/test_it/jackster.rhtml -- 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 -~----------~----~----~----~------~----~------~--~---
Keynan Pratt
2008-Jan-24  21:13 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
what does your config file look like? -- 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 -~----------~----~----~----~------~----~------~--~---
jackster.mobi
2008-Jan-25  02:27 UTC
Re: Wrong Number of Arguments 0 for 3 when calling partial
It looks pretty basic except for the roundup method I added:
ENV[''RAILS_ENV''] ||= ''production''
require ''roundup''
RAILS_GEM_VERSION = ''2.0.2'' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), ''boot'')
Rails::Initializer.run do |config|
config.action_controller.session = { :session_key =>
"_myapp_session", :secret >
"sjd989dfksjduuoud098080980980dssdssdsd" }
config.log_level = :info
end
jackster
On Jan 24, 4:13 pm, Keynan Pratt
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> what does your config file look like?
> --
> Posted viahttp://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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---