sassc-rails: compass-rails - Error: file to import not found or unreadable
I’m trying to compile a simple file
@import 'compass/reset';
Compass in installed as a gem. The result is:
SassC::SyntaxError - Error: file to import not found or unreadable: compass/reset
Current dir: /<skipped>/app/assets/stylesheets/application/
on line 2 of app/assets/stylesheets/application/screen.scss
>> @import 'compass/reset';
--------^
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (4 by maintainers)
@gon I get this when I do what @bolandrm suggested.
We ended up removing compass and putting https://github.com/Igosuki/compass-mixins into
vendor/assets/stylesheets/compass-mixins
, then putting this in our application.rb:That seemed to do the trick. Now we’re running into https://github.com/sass/sassc-rails/issues/42 with https://github.com/tsechingho/chosen-rails. Our asset urls are schemaless (on cloudfront). But the end is near. Thanks @bolandrm and everyone! This dropped our stylesheet compile time in Rails 4.0 from 70 seconds to nearly instant.
@gshilin @jsdf Thanks for the report.
It appears that the compass-rails gem does some monkey patching that is specific to the sass-rails gem.
Since I don’t use compass, I don’t think I can devote the time to fully investigating this. If there is something that sassc-raills can do to alleviate this problem, pull requests are definitely welcome.
At first glance, it appears that the compass stylesheet directories are not being added to the asset load paths. I don’t know if this completely solves the issue or not, but I was able to import
compass/reset
after adding the following toapplication.rb
: