Twitter-Bootstrap-Sass & Rails – Getting Started

Update: Bootstrap 3 now ships with Sass, Yay!

If you’re like me you prefer sass to less but like using bootstrap to quickly make your app look beautiful on all devices and browsers.

I like to use the bootstrap-sass-rails gem so I am not stuck using less. Go ahead and add this to your gemfile in the assets group.

gem 'bootstrap-sass-rails'

Next run bundle and restart the server.

You’re going to have to change the stylesheets/application.css
to stylesheets/application.css.scss. Now you’re ready to import all the components that the gem gives you.

@import "twitter/bootstrap";

note: I generally delete everything that is in this file.

If you refresh your browser you should see the bootstrap styles.

Leave a Reply