Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix deprecation warnings with ActiveSupport ~> 2.3.5 #64

wants to merge 1 commit into from

6 participants


I've gotten tired of this message in my console. :)

DEPRECATION WARNING: require "activesupport" is deprecated and will be removed in Rails 3. Use require "active_support" instead. (called from /vendor/bundle/ruby/1.8/gems/activesupport-2.3.11/lib/activesupport.rb:2)

I chose this approach instead of a nested begin/rescue block so that people using versions before 2.3.5 didn't have to suffer the overhead of two exception backtraces being generated. I tested with the first and last patch versions of each minor version of ActiveSupport between 2.0.0 and 3.0.5


+1 On this pull request.


Any reason this hasn't been pulled in?


+1. I submitted this as a pull request back in January, but it sat for months and wasn't pulled in, so don't expect anything to be done anytime soon.


Hoping to get more attention to this, as I've just started to use Metric Fu on a Rail3.1 project.


+1 on this one.

@bf4 bf4 referenced this pull request in metricfu/metric_fu

Fix deprecation warnings with ActiveSupport ~> 2.3.5 #21

bf4 commented

Gem no longer maintained, See

@bf4 bf4 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2011
  1. @cgriego
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/metric_fu.rb
3  lib/metric_fu.rb
@@ -1,11 +1,12 @@
require 'rake'
require 'yaml'
+ require 'active_support'
require 'active_support/core_ext/object/to_json'
require 'active_support/core_ext/object/blank'
require 'active_support/inflector'
rescue LoadError
- require 'activesupport'
+ require 'activesupport' unless defined?(ActiveSupport)
# Load a few things to make our lives easier elsewhere.
Something went wrong with that request. Please try again.