# Help on railendar, wrong number of arguments (0 for 1)

**URL:** <https://www.ruby-forum.com/t/help-on-railendar-wrong-number-of-arguments-0-for-1/92841>\
**Category:** Rails\
**Created:** [April 24, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/help-on-railendar-wrong-number-of-arguments-0-for-1/92841 "2007-04-24T21:42:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![XJXJXJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/eb9ed0/32.png) [@XJXJXJ](https://www.ruby-forum.com/u/XJXJXJ)\
**Post date:** [April 24, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/help-on-railendar-wrong-number-of-arguments-0-for-1/92841/1 "2007-04-24T21:42:16Z")

</div>

Hello,

Recently I am working on calendar on rails and found the Railendar  
[http://rubyforge.org/projects/railendar/](http://rubyforge.org/projects/railendar/)

When I was trying to run it, the display calendar works, but the  
admin/new function didn’t work, I got the error like

"  
ArgumentError in Admin#new

Showing app/views/admin/\_form.rhtml where line #11 raised:  
wrong number of arguments (0 for 1)  
Extracted source (around line #11):

8: \<%= text\_area ‘event’, ‘description’ %\>

  
9:  
10: 

Date  
11: \<%= date\_select ‘event’, ‘startdate’ %\>  
  
12: Start  
13: \<%= my\_time\_select ‘event’, ‘starttime’ %\>  
  
14: End

Trace of template inclusion: /app/views/admin/new.rhtml

RAILS\_ROOT: script/…/config/…  
Application Trace | Framework Trace | Full Trace

app/helpers/my\_date\_helper.rb:233:in `value' app/helpers/my_date_helper.rb:233:in `date\_or\_time\_select’  
app/helpers/my\_date\_helper.rb:217:in `to_date_select_tag' #{RAILS_ROOT}/app/views/admin/_form.rhtml:11:in `\_run\_rhtml\_47app47views47admin47\_form46rhtml’  
#{RAILS\_ROOT}/app/views/admin/new.rhtml:5:in  
`\_run\_rhtml\_47app47views47admin47new46rhtml’  
"

Basically I just follow the instruction and ran the original code, I  
searched a lot on internet and reinstalled several times and still got  
the same error. It seems somebody talked about the problem of  
date\_time\_select when upgrading to the newest rails. Much appreciate if  
anybody can give me some ideas on the problem. Thanks a lot!

Btw, my version is Ruby 1.8.2, rails 1.2.3, mysql 5.0, OSX 10.4.9,

Thanks!  
XJ

---

<div class="post-metadata">

**Author:** ![XJXJXJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/eb9ed0/32.png) [@XJXJXJ](https://www.ruby-forum.com/u/XJXJXJ)\
**Post date:** [April 24, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/help-on-railendar-wrong-number-of-arguments-0-for-1/92841/2 "2007-04-24T21:46:01Z")

</div>

the source code of my\_date\_helper.rb is here  
[http://www.koders.com/ruby/fid2E82E712D25A0DD1500891D221994D884D18BCFE.aspx](http://www.koders.com/ruby/fid2E82E712D25A0DD1500891D221994D884D18BCFE.aspx)

---

<div class="post-metadata">

**Author:** ![XJXJXJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/eb9ed0/32.png) [@XJXJXJ](https://www.ruby-forum.com/u/XJXJXJ)\
**Post date:** [April 25, 2007, 3:37am UTC](https://www.ruby-forum.com/t/help-on-railendar-wrong-number-of-arguments-0-for-1/92841/3 "2007-04-25T03:37:40Z")

</div>

all right, I found the problem by myself, for people who might also meet  
the same problem

there are some fixes on date\_he;per, please refer to  
[http://dev.rubyonrails.org/ticket/3811](http://dev.rubyonrails.org/ticket/3811), the last one  
date\_select\_regression.diff  
[http://dev.rubyonrails.org/attachment/ticket/3811/date\_select\_regression.diff](http://dev.rubyonrails.org/attachment/ticket/3811/date_select_regression.diff)

good luck

XJ wrote:

> the source code of my\_date\_helper.rb is here  
> [http://www.koders.com/ruby/fid2E82E712D25A0DD1500891D221994D884D18BCFE.aspx](http://www.koders.com/ruby/fid2E82E712D25A0DD1500891D221994D884D18BCFE.aspx)
