diff --git a/lib/geocoder.rb b/lib/geocoder.rb
index 52a1260b351070e1486a02f7908f09a74e882f7d..95548ab02bc0cf9668abf8648258b6e7b4dbcf23 100644
--- a/lib/geocoder.rb
+++ b/lib/geocoder.rb
@@ -332,7 +332,11 @@ module Geocoder
   # Name of the ActiveRecord scope method.
   #
   def self.scope_method_name
-    Rails.version.starts_with?("3") ? :scope : :named_scope
+    begin
+      Rails.version.starts_with?("3") ? :scope : :named_scope
+    rescue NameError
+      :named_scope
+    end
   end
 end