diff --git a/lib/cancan/model_adapters/active_record_adapter.rb b/lib/cancan/model_adapters/active_record_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/cancan/model_adapters/active_record_adapter.rb
+++ b/lib/cancan/model_adapters/active_record_adapter.rb
@@ -99,7 +99,7 @@ module CanCan
 
       def override_scope
         conditions = @rules.map(&:conditions).compact
-        if conditions.any? { |c| c.kind_of?(ActiveRecord::Relation) }
+        if defined?(ActiveRecord::Relation) && conditions.any? { |c| c.kind_of?(ActiveRecord::Relation) }
           if conditions.size == 1
             conditions.first
           else
make sure ActiveRecord::Relation is defined before checking conditions against it so Rails 2 is supported again - closes #<I>