【问题标题】:Failed to load SASS plugin加载 SASS 插件失败
【发布时间】:2016-06-01 23:45:53
【问题描述】:

我正在使用 GulpSASSCompasssass-css-importer 来构建我的项目。

今天我尝试在我的一台 Ubuntu 15.04 机器上初始化项目,但在构建过程中找不到 sass-css-importer。这是错误消息:

LoadError on line ["179"] of /home/sfomin/.rvm/gems/ruby-2.2.2/gems/compass-core-1.0.3/lib/compass/configuration/data.rb: cannot load such file -- sass-css-importer
Run with --trace to see the full backtrace

我已经通过 RVM 安装了 Ruby,并通过 Bundler 安装了所有依赖项。

$ bundler list
Gems included by the bundle:
  * bundler (1.10.3)
  * sass (3.4.14)
  * sass-css-importer (1.0.0.beta.0)

我正在通过 Gulp 任务调用 Compass

我不确定是什么导致了涉及如此多的第三方的问题。我自己并不喜欢 Ruby。

我们将不胜感激任何建议。

$ cat /etc/issue
Ubuntu 15.04 \n \l

$ uname -a
Linux destiny 3.19.0-20-generic #20-Ubuntu SMP Fri May 29 10:10:47 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ rvm --version
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

$ ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

$ gem --version
2.4.8

$ bundler --version
Bundler version 1.10.3

$ sass --version
Sass 3.4.14 (Selective Steve)

$ compass --version
Compass 1.0.3 (Polaris)
Copyright (c) 2008-2015 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

$ gem query --local

*** LOCAL GEMS ***

bigdecimal (1.2.6)
bundler (1.10.3)
bundler-unload (1.0.2)
chunky_png (1.3.4)
compass (1.0.3)
compass-core (1.0.3)
compass-import-once (1.0.5)
executable-hooks (1.3.2)
ffi (1.9.8)
gem-wrappers (1.2.7)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
multi_json (1.11.1)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
rdoc (4.2.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sass (3.4.14)
sass-css-importer (1.0.0.beta.0)
test-unit (3.0.8)

【问题讨论】:

    标签: ruby sass rvm bundler compass


    【解决方案1】:

    看起来这是 RVM 的一些奇怪问题。

    如果您遇到类似问题,以下是解决此问题的步骤:

    1. 使用此 SO 答案中的说明卸载 RVM: https://stackoverflow.com/a/4747195/1056679

    2. 按照本文中的说明安装 Ruby:https://gorails.com/setup/ubuntu/15.04 — 使用 rbenv 方法。

    3. 更新您的项目并从头开始重新安装所有依赖项。

    干杯!

    【讨论】:

    • 在某些情况下,问题归结为实际上没有安装 sass-css-importer [假设您在 docker 中运行它]。在这种情况下,除了您指出的内容之外,运行它可以解决它:gem install --pre sass-css-importer
    猜你喜欢
    • 2011-09-20
    • 2022-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-17
    • 2019-12-07
    • 2020-08-16
    • 2017-12-17
    相关资源
    最近更新 更多