Read more

Use Sass without Rails

Henning Koch
September 17, 2010Software engineer at makandra GmbH

You don't need a Rails application to use Sass. Even when you're working on a static site you can generate your CSS through Sass.

  • Install Sass with sudo gem install haml
  • Create a folder sass in the folder, that stores your stylesheets, e.g. mkdir css/sass
  • In a separate terminal window, run sass --watch css/sass:css. This will watch your sass files for changes and rewrite stylesheets as required.
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This even works on Windows.

Note about your .gitignore

You might want to change our typical .gitignore to not exclude public/stylesheets/*.css, since stylesheets aren't being generated automatically without Rails (this would bite you after a deploy). Instead exclude .sass-cache, which will be created in whatever folder you run sass --watch in.

Posted by Henning Koch to makandra dev (2010-09-17 14:43)