Hi --
I have a ruby script (not in a rails app) that pulls in delicious data from their API, and then I read that data out of a file. I'm having trouble formatting the date coming back from delicious.
I'd like to use '.to_date' as that works fine from within the rails app, but I don't know how to access (or require) the activesupport gem that would give me access to the 'conversions.rb' file that has the 'to_date' method.
I've tried doing this at the top of my script:
require 'activesupport/core_ext/date/conversions.rb'
Or whatever it is, but nothing is working. Any thoughts? I'd really appreciate the help. Thanks!
Try this:
require 'rubygems' require 'active_support/core_ext/date/conversions'
(Note that you don't need, and actually should not use, the .rb extension in a require, unless you're giving it a fully qualified path to a file.)
David