mockra

Bootstrap and Rails - 01 Mar 2012


Bootstrap is an incredible tool for quickly deploying your web applications with a clean and usable interface. It’s also a great fit with Agile Development and Ruby on Rails.

There are a lot of options out there for adding Bootstrap to your Rails application, including downloading the CSS files to your vendor/assets directory. You can find the files and Bootstrap documentation here: http://twitter.github.com/bootstrap/

If you want to take advantage of the Mix Ins and Variables that Bootstrap has to offer, then my recommendation is the handy bootstrap-sass gem. You can find that gem on Github here: https://github.com/thomas-mcdonald/bootstrap-sass

Just add the following line to your assets group:

gem 'bootstrap-sass'

You can then include the entire Bootstrap CSS framework by adding the following line to one of your SASS files in the assets directory.

@import 'bootstrap'

If you only want some of the features, you can import a specific group, such as the tables.

@import 'bootstrap/tables'