Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>UPDATE</strong>: Seems like there is a better way !<br> Source: <a href="http://spin.atomicobject.com/2011/07/12/sass-sprockets-compass-with-rails-3-1/" rel="noreferrer">http://spin.atomicobject.com/2011/07/12/sass-sprockets-compass-with-rails-3-1/</a></p> <p><strong>UPDATE 2</strong>(dec 2, 2011): Chris Eppstein, creator of Compass posted this Github Gist of how to integrate Compass with Rails 3.1: <a href="https://gist.github.com/1184843" rel="noreferrer">https://gist.github.com/1184843</a> </p> <p>I now prefer this method over mine, as I noticed a great speed improvement at compilation time when using livereload.</p> <hr> <p><strong>MY METHOD:</strong><br> (I now consider it deprecated, but maybe it can be useful in some cases, so here it is for reference:)</p> <p>First, in your Gemfile, add:</p> <pre><code>gem "compass", "~&gt; 0.12.alpha.0" </code></pre> <p>And don’t forget to execute a</p> <pre><code>bundle update </code></pre> <p>Then, in config/application.rb:</p> <pre><code>config.generators.stylesheet_engine = :sass </code></pre> <p>Rename application.css.scss to application.css.sass, or create it, and replace its contents by:</p> <pre><code>@import compass @import _blueprint </code></pre> <p>(If you want to keep the new Rails 3.1 manifest code at the beginning of the stylesheet, you’ll have to replace the ‘/* */’ comments by the sass-syntax version ‘//’ at the beginning of each line)</p> <p>Now, to test if compass and blueprint mixins work, add some code to the same file application.css.sass:</p> <pre><code>@import compass @import _blueprint body background: black +linear-gradient(color-stops(white, black)) +column(5) </code></pre> <p>Run your rails server with</p> <pre><code>bundle exec rails server </code></pre> <p>Load your app in a browser, and visit <a href="http://localhost:3000/assets/application.css" rel="noreferrer">http://localhost:3000/assets/application.css</a></p> <p>If everything went well, you should see the compiled code.</p> <p><strong>Source:</strong></p> <p><a href="http://blog.pixarea.com/2011/07/using-compass-blueprint-semantic-and-sass-syntax-in-rails-3-1/" rel="noreferrer">http://blog.pixarea.com/2011/07/using-compass-blueprint-semantic-and-sass-syntax-in-rails-3-1/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload