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.
F28f75d17a0c236e079c6ebbb8fff2b9?d=identicon&s=25 Mark Haliday (markh)
on 2005-12-06 03: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!
Ef4d1b20eba4b45b4a477c33bae1d156?d=identicon&s=25 ksibilev (Guest)
on 2005-12-06 05: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.