From 68b130d8ce3bf6bb0d0f26f2cb41b6cac6404cb5 Mon Sep 17 00:00:00 2001 From: Leszek Zalewski Date: Wed, 26 Jul 2017 15:27:43 +0200 Subject: [PATCH] Patch ActiveRecord only when it's available. --- lib/ddtrace/contrib/rails/framework.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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