aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/engines/sql/relations/relation.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/engines/sql/relations/relation.rb b/lib/arel/engines/sql/relations/relation.rb
index 15903412d5..13e9f0a6a2 100644
--- a/lib/arel/engines/sql/relations/relation.rb
+++ b/lib/arel/engines/sql/relations/relation.rb
@@ -2,7 +2,11 @@ module Arel
class Relation
def compiler
- @compiler ||= "Arel::SqlCompiler::#{engine.adapter_name}Compiler".constantize.new(self)
+ @compiler ||= begin
+ "Arel::SqlCompiler::#{engine.adapter_name}Compiler".constantize.new(self)
+ rescue
+ Arel::SqlCompiler::GenericCompiler.new(self)
+ end
end
def to_sql(formatter = Sql::SelectStatement.new(self))