Sass Installation

Here's how to get up and running with Sass on your machine.

You can either install Sass first, then use it within your development environment, or you can use Sass straight from an application that supports Sass.

Installing Sass is straightforward and can be done within seconds, depending on your environment. Sass requires Ruby to be installed first. Some environments (such as Mac) come with Ruby pre-installed. Other systems will require the additional step of installing Ruby.

Linux

If you don't already have Ruby installed, you can install it via the apt package manager, rbenv, or rvm.

You can then use the following command to install Sass:

Windows

If you don't have Ruby installed, you can install it using the Ruby Installer for Windows.

Once Ruby has been installed, you can install Sass by opening the command prompt, and typing the following:

Mac

As mentioned, Macs come with Ruby preinstalled.

To install Sass, open your Terminal (from the Utilities folder), and enter the following command:

If you get a permissions error, you'll probably need to add sudo to the start of the command. Like this:

Checking your Installation

You'll probably be able to tell whether Sass was installed by reading the messages.

However, you can also use the following command to check your installation:

This should return a message like this: Sass 3.4.22 (Selective Steve).

Applications that Support Sass

There are some applications that have been built specifically as a GUI interface for dealing with preprocessor technologies such as Sass.

Applications such as Hammer and CodeKit will automatically compile your Sass files into CSS files as you're working on them. Some of these applications allow you to configure the Sass options, such as the output style of the CSS file, whether to compile the Sass file to CSS every time it's saved, whether to run an autoprefixer on the CSS file, etc.

If you use one of these applications, you can use it to set up Sass instead of the command line.