From daa7e829e0222b8cd977610f13f049b1f0175fd1 Mon Sep 17 00:00:00 2001 From: Adam H Date: Fri, 20 Jan 2012 10:10:09 -0500 Subject: [PATCH] while using activerecord-sqlserver-adapter 3.1.5 with Rails 3.1 with Arel 2.2.1 we encountered the error uninitialized constant Arel::Nodes::Visitors::DepthFirst apparently Arel was trying to call a relative namespace with Visitors::DepthFirst.new(block).accept self we fixed this by making it call an absolute namespace with ::Arel::Visitors::DepthFirst.new(block).accept self --- lib/arel/nodes/node.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/arel/nodes/node.rb b/lib/arel/nodes/node.rb index 4faace37..84dcb1cd 100644 --- a/lib/arel/nodes/node.rb +++ b/lib/arel/nodes/node.rb @@ -39,7 +39,7 @@ def to_sql engine = Table.engine def each &block return enum_for(:each) unless block_given? - Visitors::DepthFirst.new(block).accept self + ::Arel::Visitors::DepthFirst.new(block).accept self end end end