Missing Dependencies in Compass/SASS

2019-05-28 22:08发布

问题:

So I haven't done too much craziness with add-ons via Compass for what I've been using it for. My primary use case was to leverage the color manipulation libraries and some of the conditional/looping structures to generate some different themes.

Yesterday I did run an install for an ellipsis library and afterwards was given the following message when attempting to 'watch' my project...

[Listen warning]: Missing dependency 'wdm' (version '~> 0.1')!
Please run the following to satisfy the dependency: gem install --version '~> 0.1' wdm

For a better performance, it's recommended that you satisfy the missing dependency.

I don't see anything in my config file that has anything to do with this 'wdm' reference, so I was hoping someone could help me figure out how to resolve this missing dependency. I have tried running any and all gem updates possible.

My current 'Frameworks & Patterns' within Compass are ::

  • compass/ellipsis - Plugin for cross-browser ellipsis truncated text.
  • compass/extension - Generate a compass extension.
  • compass/pie - Integration with http://css3pie.com/
  • compass/project - The default project layout.

Here are my @imports ::

  • @import "compass/css3";
  • @import "compass/css3/user-interface";
  • @import "partials/variables";
  • @import "partials/colors";
  • @import "partials/modules";

Thanks for reading!

回答1:

So I resolved the problem. Still unsure as to what it was that changed in my environment that resulted in me needing to deal with this dependency. The solution was not limited to the installation of the wdm gem. The native gem dependency required me to install the Ruby DevKit (http://rubyinstaller.org/downloads).

I am using a Windows 7 OS. Following the instructions located @ https://github.com/oneclick/rubyinstaller/wiki/Development-Kit I

  1. unpacked the files to C:\RubyDevKit
  2. cmd C:\RubyDevKit
  3. ruby dk.rb init >> Initialization Complete!
  4. notepad config.yml
  5. Added a reference to my primary ruby install ( - C:/Ruby200-x64 )
  6. checked that I was all good ( ruby dk.rb review )
  7. ruby dk.rb install

After that, I did a couple gem installs and then went straight for gem install wdm

After that, all my compass watching woes were null and void.

Was it worth it? Dunno...but at least I'm back to where I started.



回答2:

Probably easiest just to install it (the command is wrong though :P):

gem install --version 0.1 wdm
# and the latest
gem install wdm

I think it's guard that wants to use wdm (Windows Directory Monitor). (Compass uses guard for file listening.) You may have just picked up this change in a recent compass update.