繁体   English   中英

Cygwin:安装指南针后指南针命令不起作用

[英]Cygwin: compass command doesn't work after installing compass

我在Windows上使用cygwin64。 我已经使用以下命令安装了指南针

gem install compass

并得到结果:

Successfully installed compass-1.0.3
Parsing documentation for compass-1.0.3
Done installing documentation for compass after 1 seconds
1 gem installed

但是,当我尝试使用命令compass ,它说该命令不存在。

与cygwin相比,在我可以使用CMD进行安装时,安装有所不同。 如果我做

gem install compass

从cmd,我得到了另一种安装方式,其中包括8个gem:

C:\Windows\System32>gem install compass
Fetching: chunky_png-1.3.5.gem (100%)
Successfully installed chunky_png-1.3.5
Fetching: multi_json-1.11.2.gem (100%)
Successfully installed multi_json-1.11.2
Fetching: compass-core-1.0.3.gem (100%)
Successfully installed compass-core-1.0.3
Fetching: compass-import-once-1.0.5.gem (100%)
Successfully installed compass-import-once-1.0.5
Fetching: rb-fsevent-0.9.7.gem (100%)
Successfully installed rb-fsevent-0.9.7
Fetching: ffi-1.9.10-x86-mingw32.gem (100%)
Successfully installed ffi-1.9.10-x86-mingw32
Fetching: rb-inotify-0.9.7.gem (100%)
Successfully installed rb-inotify-0.9.7
Fetching: compass-1.0.3.gem (100%)
    Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Successfully installed compass-1.0.3
Parsing documentation for chunky_png-1.3.5
Installing ri documentation for chunky_png-1.3.5
Parsing documentation for multi_json-1.11.2
Installing ri documentation for multi_json-1.11.2
Parsing documentation for compass-core-1.0.3
Installing ri documentation for compass-core-1.0.3
Parsing documentation for compass-import-once-1.0.5
Installing ri documentation for compass-import-once-1.0.5
Parsing documentation for rb-fsevent-0.9.7
Installing ri documentation for rb-fsevent-0.9.7
Parsing documentation for ffi-1.9.10-x86-mingw32
Installing ri documentation for ffi-1.9.10-x86-mingw32
Parsing documentation for rb-inotify-0.9.7
Installing ri documentation for rb-inotify-0.9.7
Parsing documentation for compass-1.0.3
Installing ri documentation for compass-1.0.3
Done installing documentation for chunky_png, multi_json, compass-core, compass-import-once, rb-fsevent, ffi, rb-inotify, compass after 8 seconds
8 gems installed

因此,cygwin的安装方式是否应该相同? 我看到rubygems.org指南针页面上rubygems.org/gems/compass有些“运行时依赖”列-所以也许这可以解释呢? 因此cygwin不会下载依赖项,我必须手动进行操作吗?

最大的问题是,为什么指南针不能作为cygwin安装程序包使用?

顺便说一句,已经从cygwin安装程序包中安装了ruby,并且sass已安装并且可以工作。

在两个地方有一个指南针文件:

C:\cygwin64\home\(my username)\bin\compass
C:\cygwin64\home\(my username)\.gem\ruby\gems\compass-1.0.3\bin\compass

但是当我尝试运行compass命令时,它甚至没有在寻找该文件。


更新:

我安装了以下这些宝石:chunky_png multi_json罗盘核心罗盘导入一次rb-fsevent ffi rb-inotify

现在,当我运行罗盘时,它会寻找文件,但说:

C:\Ruby22\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby22/bin/compass (LoadError)

这是朝正确方向迈出的一步。 但是它在ruby的Windows安装而不是cygwin安装中寻找。

which -a compass给出的此命令:

/cygdrive/c/Ruby22/bin/compass
/cygdrive/c/Ruby22/bin/compass

^我认为这应该是usr\\bin\\gem

我有一个类似的问题。 注意不要将您可能已安装在Windows上的Ruby实例与Cygwin Ruby混淆。 您需要将Ruby bin目录添加到PATH。 这是我的操作方法(在用gem安装sass之后):

$ sass
-bash: sass: command not found

$ vi .bashrc

$ tail -2 .bashrc

export PATH=$PATH:/home/luca/bin/

$ source .bashrc

$ sass -v
Sass 3.4.23 (Selective Steve)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM