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

Cannot find other modules / ruby gems #11

Open
tamarmot opened this issue Jan 13, 2015 · 2 comments
Open

Cannot find other modules / ruby gems #11

tamarmot opened this issue Jan 13, 2015 · 2 comments

Comments

@tamarmot
Copy link

I'm working on getting the gumby framework compiling under django-pipeline-compass, and I've run into walls. Gumby Framework has dependencies on other ruby gems, namely modular-scale. I have verified that with my ruby-installed compass, I can do a compass compile.

Question: How to include other ruby gems?

When I try to use pipeline / django-pipeline-compass, and have my config.rb set to depend on the other gems, I get the following error:
File "/usr/local/lib/python2.7/dist-packages/scss/compiler.py", line 860, in _at_import
raise SassImportError(name, self.compiler, rule=rule)
scss.errors.SassImportError: Couldn't find anything to import: modular-scale
Extensions: , , , , ,

I have also tried this:
PIPELINE_COMPASS_ARGUMENTS = '--debug-info -L /var/lib/gems/1.8/gems -c build/static/external/gumby/config.rb'
which again leads to an empty gumby.css file

I have done some experimentation with including secondary .rb files in the settings / source_filenames, but in that case I get an empty gumby.css file as output (from django-pipeline-compass).

My config.rb file from gumby framework includes this and I have tried it both ways:

Tell compass where to find local extensions

If you followed directions and ran 'gem install modular-scale' comment the next two lines out:

extensions_dir = "sass/extensions"
Compass::Frameworks.register('modular-scale', :path => File.expand_path("#{extensions_dir}/modular-scale"))

Uncomment these to use regular Ruby gems.

require 'modular-scale'

require 'sassy-math'

Thanks for your help
Tamar Cohen
NASA Ames Research Center

@rikkiprince
Copy link

I'm having the same problem.

From https://github.com/vbabiy/django-pipeline-compass/blob/master/pipeline_compass/compiler.py it looks like it calls the Python Sass compiler (import sass and scss.Scss(scss_opts={'compress': False,'debug_info': settings.DEBUG,}).compile(None, content)), after adding the compass directory (included in the django-pipeline-package app) to the path.

This leads me to believe that it never calls the command line compass tool, so will not read the config.rb file.

My theory about fixing this is to adjust the @import for modular-scale in gumby.scss to @import "extensions/modular-scale/stylesheets/modular-scale";

I'm now stuck at the error:

Error evaluating expression:
    $golden

on line 7 of /path/static/gumby/sass/var/_settings.scss
imported from line 1 of /path/static/gumby/sass/gumby.scss
Traceback:
  File "/path/.virtualenvs/project/lib/python2.7/site-packages/scss/calculator.py", line 141, in evaluate_expression
    return ast.evaluate(self, divide=divide)
  File "/path/.virtualenvs/project/lib/python2.7/site-packages/scss/ast.py", line 346, in evaluate
    raise SyntaxError("Undefined variable: '%s'." % self.name)
SyntaxError: Undefined variable: '$golden'.

@tamarmot
Copy link
Author

I re-fixed this by downgrading modular-scale to 1.0.6

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

2 participants