Follow the instructions at http://cygwin.com/install.html. You will run an executable called setup.exe
which will guide you through the installation. You will eventually arrive at a screen where you can select the packages you want to install. Be sure to install Ruby (its under Interpreters/ruby
).
Once Cygwin has finished installing packages, it will offer to create icons for you. You can click on these icons to start up a terminal session, so select what ever is convenient for you.
Once installation is complete, start a terminal session.
Confirm that ruby is installed by typing this at the prompt:
ruby -v
You should see something like this come back:
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
A lot of Ruby software, including SASS and Compass, are distributed using the package manager "RubyGems". You need to install RubyGems. The instructions at http://old.stevenharman.net/blog/archive/2008/11/12/installing-rubygems-in-cygwin.aspx have worked for me.
Once you have followed those instructions, confirm that RubyGems is installed by typing this at the prompt.
gem -v
You should see something like this come back:
1.7.2
(I also get a cygwin warning, complaining that an MS-DOS style path has been detected - I have ignored this up to now with no apparent ill effects).
To install just SASS:
gem install sass
To install SASS and Compass:
gem install compass
Having reached this point, it should be plain sailing. You can follow the SASS Tutorial at http://sass-lang.com/tutorial.html and/or the Compass Installation guide at http://compass-style.org/install/.
We're almost there now. There's one last gotcha, which causes the compass watcher to crash when you change a file. For a fix, see this comment on StackOverflow: http://stackoverflow.com/a/6552159/109282
Note: it's worth being aware of Cygwin style paths, and how they differ from Windows style paths. Basically, a Windows path like this:
C:\Users\bob\project1\
... maps to a Cygwin path like this:
/cygdrive/c/Users/bob/project1/
There's more info at http://cygwin.com/cygwin-ug-net/using.html#cygdrive.
today, I try to install the compass gem, but mkmf.log says
package configuration for libffi is not found
"gcc -o conftest.exe -I/usr/include/ruby-2.2.0 -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I. -ggdb -O2 -pipe -Wimplicit-function-declaration conftest.c -L. -L/usr/lib -L. -fstack-protector -lruby220 -lpthread -lgmp -ldl -lcrypt "
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: no se puede encontrar -lgmp
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: no se puede encontrar -lcrypt
collect2: error: ld devolvió el estado de salida 1
checked program was:
/* begin _/
1: #include "ruby.h"
2:
3: int main(int argc, char *_argv)
4: {
5: return 0;
6: }
/* end */
I have cygwin 64bit