Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: --r flag conflicts with config.rb 'require' #1861

Open
bdkjones opened this issue Oct 24, 2014 · 0 comments
Open

CLI: --r flag conflicts with config.rb 'require' #1861

bdkjones opened this issue Oct 24, 2014 · 0 comments

Comments

@bdkjones
Copy link

Hey Chris,

I have a Compass project that uses sass-globbing. So in config.rb there is this line:

require 'sass-globbing'

All's well and good. But now, suppose I use the CLI to compile and I do this:

compass compile [project path] [file path] --r [path to sass-globbing plugin]

In this case, Compass attempts to load the sass-globbing plugin twice and fails to run with this exception:

/Library/Ruby/Gems/2.0.0/gems/sass-globbing-1.1.0/lib/sass/globbing/importer.rb:8: warning: already initialized constant Sass::Globbing::Importer::GLOB
/Applications/CodeKit.app/Contents/Resources/engines/sass-globbing/globbing.rb:17: warning: previous definition of GLOB was here
/Library/Ruby/Gems/2.0.0/gems/sass-globbing-1.1.0/lib/sass/globbing/importer.rb:10: warning: already initialized constant Sass::Globbing::Importer::SASS_EXTENSIONS
/Applications/CodeKit.app/Contents/Resources/engines/sass-globbing/globbing.rb:19: warning: previous definition of SASS_EXTENSIONS was here
SystemStackError on line ["126"] of /Applications/CodeKit.app/Contents/Resources/engines/sass-globbing/globbing.rb: stack level too deep

Importantly, the path to sass-globbing that I'm passing with the --r flag is a different path than /Library/Ruby/2.0/Gems/etc... (which is the location the require statement from the config.rb file is targeting) I don't know if that makes a difference.

Should Compass check to make sure that plugins brought in via the --r flag aren't already handled by a require statement in the config.rb file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant