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

后端 未结 11 1611
囚心锁ツ
囚心锁ツ 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:24

    This specific version works well on both:

    gem 'sass', '3.3.0.alpha.149'
    gem 'compass', '0.12.2'
    

    They might not be compatible with each other that's why you're getting those errors (considering you're using a bleeding edge version).

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

    I was able to fix it by doing this

    gem uninstall sass
    gem install sass -v 3.2.12
    

    This is definitely due to a version dependency issue, you are better off fixing your grunt task to make it forward compatible with the newer versions of saas, compass and so on.

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

    The following combinations worked for me:

    gem install compass --pre
    gem install sass -v 3.3.3
    
    0 讨论(0)
  • 2020-12-02 12:30

    I had to setup a gemfile with the correct versions (this error is caused by mismatched SASS and Compass versions, for me). I used thew following with bundle install to fix the problem:

    source "https://rubygems.org"
    
    gem 'bootstrap-sass', "~> 3.2.0"
    gem 'sass', [ "< 3.5" , ">= 3.3.13" ]
    gem 'compass', "~> 1.0.1"
    gem 'compass-core', "~> 1.0.1"
    gem 'compass-import-once', "~> 1.0.5"
    gem 'chunky_png', "~> 1.2"
    gem 'rb-fsevent', ">= 0.9.3"
    gem 'rb-inotify', ">= 0.9"
    
    0 讨论(0)
  • 2020-12-02 12:32

    A variation on the above answers: for me (using Bootstrap for Sass), it turned out to be

    gem install bootstrap-sass
    

    that was needed in order to fix this problem. For me, the LoadError problem with Compass started after I updated the version of Ruby I was using.

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

    Uninstall sass and reinstall it with the following:

    gem uninstall sass
    gem install sass
    

    There was an issue with my installation of sass and doing this fixed the issue.

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