diff --git a/lib/ddtrace/contrib/rails/framework.rb b/lib/ddtrace/contrib/rails/framework.rb index c8af12e6fef..6bb8084733a 100644 --- a/lib/ddtrace/contrib/rails/framework.rb +++ b/lib/ddtrace/contrib/rails/framework.rb @@ -12,7 +12,7 @@ require 'ddtrace/contrib/rails/utils' # Rails < 3.1 -unless defined?(ActiveRecord::Base.connection_config) +if defined?(::ActiveRecord) && !defined?(::ActiveRecord::Base.connection_config) ActiveRecord::Base.class_eval do class << self def connection_config