Search code examples
drupal-7guardcompass

Compass error: File to import not found or unreadable: breakpoint


For unknown reasons my Drupal Omega 4 subtheme dev environment stopped working all of a sudden. I have narrowed the problem down to a Compass issue:

 % compass watch
>>> Compass is watching for changes. Press Ctrl-C to Stop.
    error sass/layouts/sidebar/sidebar.layout.scss (Line 3: File to import not found or unreadable: breakpoint.
Load paths:
  Compass::SpriteImporter
  /home/<myproject>/public_html/sites/all/themes/<myproject-theme>/sass
  /usr/share/rvm/gems/ruby-2.2.1@omega.<myproject-theme>/gems/compass-core-1.0.3/stylesheets
  /usr/share/rvm/gems/ruby-2.2.1@omega.<myproject-theme>/gems/compass-normalize-1.5/stylesheets
  /usr/share/rvm/gems/ruby-2.2.1@omega.<myproject-theme>/gems/susy-2.2.5/sass)
    error sass/layouts/sidebar/<myproject>-sidebar.layout.scss (Line 4: File to import not found or unreadable: breakpoint.

Guard is running without errors but is not compiling on scss file changes.

% guard start -i
07:25:07 - INFO - Guard is now watching at '/home/<myproject>/public_html/sites/all/themes/<myproject-theme>'

I tried emptying the gemset with

rvm gemset empty

and reinstalling everything with Bundler

bundle install

I have used the instructions here for setting up my environment:

https://www.drupal.org/node/1936970

I have a .ruby-version file in my project folder specifying version 2.2.1.

All help very appreciated.


Solution

  • The problem was a missing config.rb file that Compass needs to compile the Sass files.

    Now Compass reports ready for action:

     % guard start -i
    
    07:27:21 - INFO - Guard::Compass is waiting to compile your stylesheets.
    07:27:21 - INFO - Guard is now watching at '/home/<myproject>/public_html/sites/all/themes/<myproject-theme>'
    

    I must have deleted it by mistake - and since it was included in my .gitignore, I had no way of knowing this.

    Lesson learned: do not exclude config.rb in .gitignore!