bootstrap twitter in rails 3.1
open terminal and type
rails new bootstrap
now we make a products controller which have the name and price attribute. But this time we skip any stylesheet for products
rails g scaffold products name:string price:decimal --skip-stylesheets
browse in favorite http://localhost:3000/products
open Gemfile which is located under the bootstrap folder
add the line gem 'twitter-bootstrap-rails'
under the asset group
and save it.
Now stop the rails server by ctrl+c
short cut key.
rails g bootstrap:install
you can see in terminals which files are being created.
To see the result, type
make it themed by
rails g bootstrap:themed products -f
refresh and enjoy it.
Note:- every time you run bootstrap code in terminal, make sure you stop rails server and run command and again run rails server to check it.