参考元
http://i-b-c.jp/how/cloud9/rubyrails%E3%81%B8-bootstrap-%E5%B0%8E%E5%85%A5/
まず適当に新しいアプリケーションを作成
rails new hello_bootstrap
bootstrapのgemをインストール
Gemfileを開いてgem追加
vi Gemfile
gem 'bootstrap-sass'
bundle install
app/assets/stylesheets/application.cssを
~/application.scssにリネーム
以下のコードを追加
~/application.scss
@import "bootstrap-sprockets";
@import "bootstrap";
続いて
app/assets/javascripts/application.jsに以下のコードを追加
app/assets/javascripts/application.js
//= require bootstrap-sprockets
以上でbootstrapの設定は完了
適当にviewをつくり確認していく
rails g controller home top
top.html.erb
<div id="header" style="background:black;">header</div>
<div class="row">
<div class="col-sm-4" style="background-color:blue">Main 1 </div>
<div class="col-sm-4" style="background-color:yellow">Main 2 </div>
<div class="col-sm-4" style="background-color:red">Main 3 </div>
</div>
上記のコードはdotinstallから参照