Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fix deprecation warnings with ActiveSupport ~> 2.3.5 #64

wants to merge 1 commit into from

6 participants

Chris Griego Mark Sim Steve Klabnik Kurtis Rainbolt-Greene Christopher John CZETTEL Benjamin Fleischer
Chris Griego

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

Mark Sim

+1 On this pull request.

Mark Sim

Any reason this hasn't been pulled in?

Steve Klabnik

+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.

Kurtis Rainbolt-Greene

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

Christopher John CZETTEL

+1 on this one.

Benjamin Fleischer bf4 referenced this pull request in metricfu/metric_fu

Fix deprecation warnings with ActiveSupport ~> 2.3.5 #21

Benjamin Fleischer
bf4 commented

Gem no longer maintained, See

Benjamin Fleischer 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. Chris Griego
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.