Appendix A. Installing Sass and Compass
Both Sass and Compass are command-line tools built on top of the Ruby programming language. To use them you’ll need to have Ruby installed as well as a basic understanding of your computer’s command line. Sass and Compass can be installed on Windows, Mac OS X, and Linux.
Windows doesn’t come with Ruby, so unless you have previously installed it, you’ll need to do so now. It only takes a few minutes.
On Windows 7, you can launch the command prompt from the Windows start menu by selecting All Programs > Accessories > Command Prompt. Alternately, you can type command into the search box and then select Command Prompt from the results.
On earlier versions of Windows, you can launch the command prompt by selecting All Properties > Accessories > Command Prompt. Alternatively, you can select Run and then enter cmd and press Return.
When the command prompt is running, you should see a window like figure A.1.
From the command prompt, type ruby -v and then press Return. If Ruby isn’t installed, the command prompt will tell you 'ruby' is not recognized as an internal or external command, operable program or batch file. If Ruby is installed, it’ll print out the version of Ruby you have installed. The version should be greater than or equal to 1.8.7 (if 1.8.6 or below, please install Ruby with the following instructions).
Go to http://rubyinstaller.org/downloads/. Click on the most recent Ruby version and click Run. Walk through the guided installer’s steps. When you get to the third screen, it’ll ask you where to install Ruby; check the two check boxes before continuing.
Now close your command prompt and launch it again, and verify that Ruby is installed by typing ruby -v and pressing Return.
Ruby comes with a system for installing Ruby-based software called RubyGems. Both Sass and Compass can be easily installed using this system. To install the latest version of Sass:
In each case, you should see output that looks like this:
After installing, you should verify that the applications are installed correctly by running the following commands:
Mac OS X has come with Ruby installed by default for some time now, so it’s likely that you don’t need to install Ruby.
You can launch the terminal application from the Finder by going into Applications > Utilities and double-clicking the Terminal application.
If you’re unfamiliar with the Mac OS X Terminal, we recommend that you read the Terminal tutorial written by John Long, which can be found at http://wiseheartdesign.com/articles/2010/11/12/the-designers-guide-to-the-osx-command-prompt/.
From the command prompt, type ruby -v and then press Return. If Ruby isn’t installed, the command prompt will tell you bash: ruby: command not found. In this unlikely scenario, please follow the instructions for installation found at http://rubyosx.rubyforge.org/. Be sure to restart the Terminal after installing.
Ruby comes with a system for installing Ruby-based software called RubyGems. Both Sass and Compass can be easily installed using this system. To install the latest version of Sass and Compass:
In each case, you should see output that looks like this:
After installing, you should verify that the applications are installed correctly by running the following commands:
Please follow your Linux distribution’s instructions for installing Ruby if it’s not installed.
It’s assumed that as a Linux user you know how to access your terminal.
If Ruby isn’t installed, install it using your Linux distribution’s software installation mechanism.
Ruby comes with a system for installing Ruby-based software called RubyGems. Both Sass and Compass can be easily installed using this system. To install the latest version of Sass:
In each case, you should see output that looks like this:
After installing, you should verify that the applications are installed correctly by running the following commands: