James Gray
2/25/2008 7:34:00 PM
On Feb 25, 2008, at 1:08 PM, Trans wrote:
>
>
> On Feb 25, 8:36 am, "Rick DeNatale" <rick.denat...@gmail.com> wrote:
>> On 2/25/08, Sukeerthi Adiga <sukeerthiad...@gmail.com> wrote:
>>
>>
>>
>>> 7stud -- wrote:
>>>> Sukeerthi Adiga wrote:
>>>>> Loading development environment.
>>>>>>> Time.now.to_date
>>>>> Time.now.to_date
>>>>> NoMethodError: private method `to_date' called for Mon Feb 25
>>>>> 12:04:10
>>>>> +0530 2008:Time
>>>>> from (irb):1
>>
>>>>> earlier it use to work fine..
>>>>> can any one help me whats the prob is?
>>
>>>>> in terminal it shows like this..
>>
>>>>> sukeerthi@sukeerthi-desktop:~$ ruby -v
>>>>> ruby 1.8.6 (2007-06-07 patchlevel 36) [x86_64-linux]
>>>>> sukeerthi@sukeerthi-desktop:~$
>>
>>>> $ ruby -v
>>>> ruby 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0]
>>
>>>> puts Time.now.to_date
>>
>>> so where should i make change so that it should work..
>>> in most of the functions i have written
>>
>> Ruby is not Rails!
>>
>> The problem is that Time#to_date is an extension which Rails makes to
>> Ruby.
>
> Not so.
>
> $ qri to_date
> ------------------------------------------------------ Multiple
> choices:
>
> Time#to_date, XSD::XSDDateTimeImpl#to_date
$ qri to_date
------------------------------------------------------ Multiple choices:
ActiveSupport::CoreExtensions::Date::Conversions#to_date,
ActiveSupport::CoreExtensions::String::Conversions#to_date,
ActiveSupport::CoreExtensions::Time::Conversions#to_date,
Time#to_date, XSD::XSDDateTimeImpl#to_date
James Edward Gray II