简体   繁体   中英

Cygwin: compass command doesn't work after installing compass

I use cygwin64 on windows. I have installed compass using the command

gem install compass

and have got the result:

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

But when I try to use the command compass , it says the command doesn't exist.

There is a difference in the installation from cygwin compared to when I do it in CMD, where it works. If I do

gem install compass

from cmd, I get a different kind of installation including 8 gems:

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

So , shouldn't this installation be the same for cygwin? I see on the compass page on rubygems.org rubygems.org/gems/compass that some "Runtime Dependencies" are listed - so maybe that explains it? So cygwin doesn't download the dependencies, and I have to do it manually?

The big question is, why isn't compass available as a cygwin installer package?

By the way, ruby has been installed from the cygwin installer packages, and sass is installed, and working.

There is a compass file in two places:

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

but it isn't even looking for this file when I try to run compass command.


Update:

I installed these gems: chunky_png multi_json compass-core compass-import-once rb-fsevent ffi rb-inotify

and now when I run compass it looks for the file, but says:

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

which is a step in the right direction. But it looks for it in the windows installation of ruby, not the cygwin installation.

this command which -a compass gives:

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

^this is supposed to be usr\\bin\\gem I think..

I had a similar problem. Be careful that you don't get confused between the Ruby instance you may have installed on your Windows and the Cygwin Ruby. You need to add the Ruby bin directory to your PATH. Here's how I did it (after I installed sass with gem):

$ 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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