Skip to content

Ruby on Rails Integration

willywg edited this page Sep 15, 2011 · 25 revisions

Moved

Outdated, please go to http://compass-style.org/help/


Rails 3:

$ compass init rails /path/to/myrailsproject

Rails 2.3 Users:

You can install Compass/Sass into a new or existing rails app using our official rails application template.

for a new application:
$ rails <myrailsappnamehere> -m http://compass-style.org/rails/installer

for existing application, use the application template rake task:
$ rake rails:template LOCATION=http://compass-style.org/rails/installer

You can also set the environment variable NO_SUDO to true to disable sudo usage in the script
$ rake rails:template LOCATION=http://compass-style.org/rails/installer NO_SUDO=true

If you have an existing application, and are already using Haml, and don’t want to use the application template (which tries to install Haml for you), you can manually install compass by following these directions

Screencast!

Having issues? Watch this quick screencast on how to set everything up:
Get Compass and Sass working with Rails FAST!

Rails Pre-2.3:

Please follow these instructions

Compass does not support Rails before 2.2.

Clone this wiki locally