簡體   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