small medium large xlarge

17 Sep 2011, 11:56
Colin Jack (11 posts)


I’ve just started digging into your book, first thing I had to do was get it setup in Rails 3.1. All the book offered was:

“If you use another framework like Rails with Sass, you should reference how to setup a Compass project for it.”

I know its not possible to cover every framework, or every version of every framework, but it is a pity that at this point I need to go and filter through the umpteen out-of-date sets of steps for integrating Rails 3.1 with compass just to get moving.

I was thus thinking it might be worth mentioning a few guides for gettng compass setup so that people can get setup quickly.



20 Sep 2011, 10:57
Michael JL Catlin (11 posts)

Colin -

You pretty much read our minds. We’ve been working on a “Using with Rails” task for a while, and wanted to get it spot-on before we included it. It should be there in the next release, though.



16 Nov 2011, 20:25
Krett David B (1 post)

I have just seen beta 4 and the section that deals with this is disappointing to say the least especially with respect to setting this up with Rails 3.1 and having compass and sass work efficiently in development in the asset pipeline. Your book implies there is a working reference as to how to set this up and broad brushes the topic.

Using the references that are available for rails 3.1 (a gist and a blog post), I cannot get compass working in a rails 3.1 project and therefore have to run it in standalone mode. From my research there is no specific reference that shows how to integrate compass in the pipeline, and the only gist referencing the supposed correct setup results in an asset pipeline which is not useable in development. Furthermore running compass in standalone mode with a rails 3.1 project is buggy, sprites dont work for example. Rather than brushing over this issue it would be good if you could provide the exact reference source one should be using to get compass working effectively, and your recommended configuration. I would expect this at a minimum for a book I am purchasing that supposedly is to inform one how to use sass/compass for developing apps.

16 Nov 2011, 18:14
Michael JL Catlin (11 posts)

David, I’m very sorry you found that task lacking. We really wanted to focus on Sass itself, as a technology, rather than the specifics. Rails 3.1 has been unstable during the time that we’ve been writing, so we only wanted to cover it broadly.

Here’s another link you could try:

Thanks for the feedback, and apologies again.


11 Dec 2011, 23:32
Geoffrey Clements (22 posts)

I wanted to use some pieces from compass like the reset and I’ll probably need some other pieces too. The magic lines for me were adding config load paths like this:

class Application < Rails::Application config.sass.load_paths « ”#{Gem.loaded_specs[‘compass’].full_gem_path}/frameworks/compass/stylesheets” config.sass.load_paths « ”#{Gem.loaded_specs[‘compass’].full_gem_path}/frameworks/blueprint/stylesheets”

in config/application.rb

I renamed app/assets/stylesheets/application.css to app/assets/application.css.scss

and now I can add:

@import “compass/reset”;

to application.css.scss and the reset works. I’m pretty sure other mixins from compass would work too.

20 Dec 2011, 23:03
Michael JL Catlin (11 posts)

That’s good to know, Geoffrey. Thanks :)