Twitter Bootstrap for Rails 3

Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more


Add gems inside asset group in your Gemfile

group :assets do
    gem ‘therubyracer’, ‘0.10.2’, :platforms => :ruby
    gem ‘libv8’, ‘’
    gem ‘less-rails’

    gem ‘twitter-bootstrap-rails’


bundle install


rails generate bootstrap:install less

Step – 4

Generating layouts and views

rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]

rails g bootstrap:layout application fluid


To add theme in all files of a resource (generates Twitter Bootstrap compatible scaffold views.)

rails g bootstrap:themed [RESOURCE_NAME]



rails g scaffold Post title:string description:text
rake db:migrate
rails g bootstrap:themed Posts




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s