Skip to content

Instantly share code, notes, and snippets.

@marty-mcgee
Forked from Geraint/README.md
Last active August 29, 2015 14:22
Show Gist options
  • Save marty-mcgee/abd98a42c444c04daad6 to your computer and use it in GitHub Desktop.
Save marty-mcgee/abd98a42c444c04daad6 to your computer and use it in GitHub Desktop.

Install Cygwin & Ruby

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]

Install RubyGems

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

Install SASS/Compass

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/.

One last gotcha

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

Cygwin Style Paths

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment