From: Sukeerthi Adiga Date: 2008-02-25T16:18:28+09:00 Subject: Re: NoMethodError: private method `to_date' 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 # 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 >> -- Posted via http://www.ruby-forum.com/.