Using Susy with Ruby on Rails
Susy is a Sass add-on for grids recommended by Compass. You can read more about Susy in Chapter 10, Building grid-based layouts with Susy and Sass chapter of this book.
Getting ready
To demonstrate the Susy grid in the RoR app, the SCSS and HTML code of the Defining containers and columns recipe of Chapter 10, Building grid-based layouts with Susy and Sass, will be used again.
Note
Rails 4.1 and below include a version of sass-rails, which does not support Sass 3.3 by default. Susy 2 requires Sass >= 3.3
. So in order to use Susy 2 with Rails, you must update your Gem file to use sass-rails ~> 5.0.0
.
How to do it...
After performing the followings step you will know how to use the Susy add-on for Compass to create a grid-based layout for your RoR app:
- Create a new Rails app by running the following command in your console:
rails new recipe4
- Run, as already described in the Hello world with Ruby on Rails recipe, the "controller" generator and tell it...