Rails4でTwitterBootstrap3を導入する方法
Gemfileにbootstrap-sassを追加。(バージョンは適宜指定)
gem 'bootstrap-sass', '3.0.2.0'
bundle install
bundle install --path vendor/bundle
config/application.rb に下記の一行を追加。
BootstrapとAssetPipelineの互換性のため必要らしい。
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
cssまたはscssでbootstrapをインポート。
app/assets/stylesheets/custom.css.scss
@import "bootstrap";
application.jsでbootstrapをインポート。
app/assets/javascripts/application.js
//= require bootstrap
以上!