From b2c7d4d855178c1cdfc34ff91146c3261fcf5a8c 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 dd13704..6fab954 100644 --- a/lib/sassc/rails/importer.rb +++ b/lib/sassc/rails/importer.rb @@ -96,7 +96,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|