Dmitri K. wrote in post #1071361:
> $ ruby -v
> ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
> $ irb
> 1.9.3p0 :001 > require 'rubygems'
> => false
> 1.9.3p0 :002 > require 'active_support/core_ext/date/calculations.rb'
> => true
> 1.9.3p0 :003 > require 'active_support/core_ext/integer/time.rb'
> => true
> 1.9.3p0 :004 > require 'active_support/core_ext/numeric/time.rb'
> => true
> 1.9.3p0 :005 > 0.months.since Date.current
> ArgumentError: expected a time or date, got #<Date: 2012-08-05
> ((2456145j,0s,0n),+0s,2299161j)>
Since this statement works fine if all of Rails is loaded then you must
still be missing some required files.
$ rails c
Loading development environment (Rails 3.2.7)
irb(main):001:0> Date.current
=> Sun, 05 Aug 2012
irb(main):002:0> 0.months.since Date.current
=> Sun, 05 Aug 2012
--
Posted via
http://www.ruby-forum.com/.