Forum: Ruby on Rails Time Extensions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mark H. (Guest)
on 2005-12-06 04:56
Ok, I've copied the following code from the RoR book:

require 'rubygems'
require_gem 'activesupport'

now =
puts now
puts now.ago(2600)

I get an error on the line: puts now.ago(2600)
(undefined method `ago' for Mon Dec 05 20:56:24 Central Standard Time

For the life of me, I cannot seem to see what is wrong.

Any help?  Thanks!
ksibilev (Guest)
on 2005-12-06 06:46
(Received via mailing list)
That's because activesupport gem lacks autorequire 'active_support'
I'm not sure whether it's a bug or not. Anyway use these statements:

require 'rubygems'
require_gem 'activesupport'
require 'active_support'

This topic is locked and can not be replied to.