I am trying to use an ActiveRecord function in a Ruby script, and I
can’t
get it to work. I am using ActiceRecord 3.2.8.
require ‘active_support/all’
Time.zone.parse(“2012-10-20”)
NoMethodError: undefined method parse' for nil:NilClass from (irb):2 from /Users/pjj/.rvm/rubies/ruby-1.9.2-p320/bin/irb:16:in’
Time.zone.parse works absolutely fine in a Rails console.
I am not sure what step I am missing. What is Rails doing to let us use
this function directly?