undefined method `to_json' for #<Hash:0x3d3cef0> (NoMethodError) in ActiveSupport 3
Try adding require "active_support/core_ext"
require 'active_support'
doesn't inject behavior into the core classes by itself. That way you can pick which extensions you want. Using core_ext
dumps the extensions you are familiar with from rails into the core classes.