At the top of your script do this:
require 'rubygems' require 'active_support'
Cheers-
-- Ezra Zygmuntowicz-- Lead Rails Evangelist -- ez@engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)
At the top of your script do this:
require 'rubygems' require 'active_support'
Cheers-
-- Ezra Zygmuntowicz-- Lead Rails Evangelist -- ez@engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)
And if you need to specify a particular version:
require 'rubygems' gem 'activesupport', '>=1.4' require 'active_support'
Note that the name of the gem has no '_' (I beat my head on that one a few weeks ago). The 'gem' method sets up the load path for a version of the gem that meets the requested restriction.
-Rob
Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com
Please can anyone explain why this works in rails but not in irb ?
require 'active_support'
=> true
Time.now.beginning_of_day
NoMethodError: undefined method `beginning_of_day' for Fri Oct 29 14:05:28 +1300 2010:Time from (irb):2
Thanks Ben
Solved now,
require 'active_support/all'
=> true
Time.now.beginning_of_day
=> Mon Nov 01 00:00:00 1300 2010
Ben Williams wrote in post #957932: