private method `min' called for #<Date: 4899253/2,0,2299161> error

Posted on 2007-10-18
Last Modified: 2013-11-13

I am rewriting PL/SQL appliation to rails and when I clicked 'edit' link(after performing 'generate ...' command) I am having the following error.

19: <p><label for="attending_ip_dob">Dob</label><br/>
20: <%= datetime_select 'attending_ip', 'dob'  %></p>

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:191:in `select_minute'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:390:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:390:in `date_or_time_select'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:385:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:385:in `date_or_time_select'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:356:in `to_datetime_select_tag_without_error_wrapping'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/active_record_helper.rb:209:in `to_datetime_select_tag'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:132:in `datetime_select'
#{RAILS_ROOT}/app/views/attending_ips/_form.rhtml:20:in `_run_rhtml_47app47views47attending_ips47_form46rhtml'
#{RAILS_ROOT}/app/views/attending_ips/edit.rhtml:4:in `_run_rhtml_47app47views47attending_ips47edit46rhtml'
#{RAILS_ROOT}/app/views/attending_ips/edit.rhtml:3:in `_run_rhtml_47app47views47attending_ips47edit46rhtml'
-e:4:in `load'

It looks like to me that this is because of the input format (dd/dd/yyyy) that used to take for old app. For example, in the table:
DOB: 1994-10-01 00:00:00.0

However, other auto generated field such as 'LAST_MODIFIED_BY'(type is date) column is working fine.
LAST_MODIFIED_BY: 2007-10-15 18:43:05.0

how can I solve this problem? Is there something other than 'datetime_select'?

thanks in advance
Question by:dkim18
    1 Comment
    LVL 18

    Accepted Solution

    if you aren't using date and time, use date_select rather than datetime_select.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In Ruby, Call or invoke a API DLL library is easily via Win32API class, win32-api gem or other gems. For general DLL API call, there are quite a few references, some good tips list below:…
    Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
    This video discusses moving either the default database or any database to a new volume.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now