Sukeerthi Adiga wrote: > Shiva Kumaran wrote: >> just try in console mode :/ruby script/console >> it will work >> >> >> 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:~$ > > tried no use same error m gettin > > > sukeerthi@sukeerthi-desktop:/home/workspace/St$ ruby script/console > Loading development environment. > oldcolname==old2 ,newcolname==new2 > /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in > `const_missing':NameError: uninitialized constant Test >>> time.now.to_date > NameError: undefined local variable or method `time' for > #<Object:0x2b536c4b8350> > from (irb):1 >>> Time.now.to_date > NoMethodError: private method `to_date' called for Mon Feb 25 12:45:18 > +0530 2008:Time > from (irb):2 >>> Hi Sukeerthi, Better u change your rails version, Mine is rails 1.2.3, The problem what you have sent its working fine. deepac@deepa-UBUNTU-7:~/workspace/srishti$ script/console Loading development environment. >> Time.now => Mon Feb 25 13:03:46 +0530 2008 >> a = Time.now => Mon Feb 25 13:04:07 +0530 2008 >> a.to_date => #<Date: 4909043/2,0,2299161> >> Time.now.to_date => #<Date: 4909043/2,0,2299161> :0) -- Posted via http://www.ruby-forum.com/.