Why does “compass watch” say it cannot load sass/script/node (LoadError)?

后端 未结 11 1612
囚心锁ツ
囚心锁ツ 2020-12-02 11:39

I\'m having a problem with my compass watch command - it worked fine up until a few days ago. I have made no changes to my config files.

I reinstalled Compass, used

相关标签:
11条回答
  • 2020-12-02 12:36

    This combination is finally working for me to bring Compass and SASS Sourcemaps together:

    Gemfile

    gem 'sass', '3.3.0.alpha.149'
    gem 'compass', '0.12.2'
    gem 'compass-sourcemaps', "~> 0.12.2.sourcemaps.57a186c"
    

    Compass config.rb

    sass_options = {:sourcemap => true}
    
    0 讨论(0)
  • 2020-12-02 12:38

    In my case, Sass version was not compatible with Compass.

    FIX :

    1. uninstall Sass AND Compass

      gem uninstall compass
      gem uninstall sass
      
    2. install Compass who will install a compatible Sass engine automaticaly

      gem install compass
      
    0 讨论(0)
  • 2020-12-02 12:39

    I had the same problem and then I realised that I had two compass versions, so by doing:

    compass watch or compass compile

    The compiler didn't know which compass version it should use to compile. So, what you can do is explicitly indicate the compass version to work with:

    compass _1.0.3_ watch

    There's another interesting thread.

    0 讨论(0)
  • 2020-12-02 12:40

    In case you are using Ubuntu it may be a problem with apt-get and rvm colliding.

    Try removing rvm with rvm implode and then run

    sudo apt-get install ruby-compass 
    

    compass watch worked for me after that.

    0 讨论(0)
  • 2020-12-02 12:43

    I believe this is due to versioning conflicts with sass.

    https://rubygems.org/gems/compass gem is currently at v0.12.16 currently - add this to Gemfile

    gem 'sass', '3.2.19'
    gem 'compass', '0.12.6'
    

    You may be required to uninstall all versions of both gems first.

    0 讨论(0)
提交回复
热议问题