Skip to content
Guard::Compass automatically rebuilds scss|sass files when a modification occurs taking in account your compass configuration.
Ruby CSS
Find file
New pull request
Pull request Compare This branch is 37 commits ahead of oliamb:master.
Latest commit 2d59d92 @rymai rymai Bump to 1.1.0


Gem Version Build Status Dependency Status Code Climate Coverage Status

Guard::Compass allows to automatically run Compass whenever a stylesheet file is modified.

  • Compatible with Compass >= 0.10.5.
  • Tested against Ruby 1.9.3, 2.0.0, Rubinius & JRuby (1.9 mode only).


Please be sure to have Guard installed before continue.

The simplest way to install Guard::Compass is to use Bundler.

Add Guard::Compass to your Gemfile:

group :development do
  gem 'guard-compass'

and install it by running Bundler:

$ bundle

Add guard definition to your Guardfile by running the following command:

$ guard init compass


Please read Guard usage doc

guard :compass, configuration_file: 'config/compass_config.rb', project_path: 'public',
      compile_on_start: true do

Configure Guard::Compass plug-in

The default configuration generated by 'guard init compass' looks like this

guard :compass


List of available options

project_path: 'public'                          # path to the compass project directory (from guard working directory)
configuration_file: 'config/compass_config.rb'  # path to your compass configuration file (from guard working directory)
compile_on_start: true                          # compile stylesheets when guard starts

By default, the project path is equal to the guard working directory (the folder from where you start Guard). Compass will look into some default location for the config file from there.

The configuration_file is computed by compass. You don't need to define watchers like in other Guard plug-in because they are generated from the Compass configuration files, cool!

For the complete list of options, please refer to the Compass documentation.


Pull requests are very welcome! Please try to follow these simple rules if applicable:

  • Please create a topic branch for every separate change you make.
  • Make sure your patches are well tested. All specs run by Travis CI must pass.
  • Update the README.
  • Please do not change the version number.

For questions please join us in our Google group or on #guard (


Rémy Coutable


Olivier Amblet


Something went wrong with that request. Please try again.