From 2cdc612fae09f4c7ae956c26db95e105357e9fe3 Mon Sep 17 00:00:00 2001 From: Matthew Kirk Date: Mon, 28 Nov 2016 11:33:47 -0800 Subject: [PATCH] Stringify paths to unique paths correctly The problem here is that gems like compass-sass and bootstrap-sass will build their own Importer classes that aren't being properly uniqued. Also this resolves the issue outlined in https://github.com/sass/sassc-rails/issues/79 --- lib/sassc/rails/importer.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sassc/rails/importer.rb b/lib/sassc/rails/importer.rb index 63a509e..7564baa 100644 --- a/lib/sassc/rails/importer.rb +++ b/lib/sassc/rails/importer.rb @@ -94,7 +94,9 @@ def imports(path, parent_path) return glob_imports(base, m[2], parent_path) end - search_paths = ([parent_dir] + load_paths).uniq + # Compass and other gems us their own special loaders + # Hence making this to_s required to have a proper uniq set. + search_paths = ([parent_dir] + load_paths).map(&:to_s).uniq if specified_dir != "." search_paths.map! do |path|