本人 rails 新手,使用 rails 4.0 , 在 rails app 中添加 Bootstrap 支持, 参考 Ruby on Rails tutorial 2nd edition En。
Step 1 添加 bootstrap-sass 到 Gemfile
打开 Gemfile 添加如下内容:
| 1 2 |  | 
Step 2 安装
直接运行:
| 1
 |  | 
Step 3 创建 custom.css.scss
创建 custom.css.scss 文件:
app/assets/stylesheets/custom.css.scss
在 app/assets/stylesheets 下的文件会自动被 application.css include进来。
在这个文件中可以添加 bootstrap CSS 进来,在 custom.css.scss 中添加:
| 1
 |  | 
当然,还可以在custom.css.sass文件中添加自己的custom 如:
| 1 2 3 4 5 6 7 8 9 10 11 12 |  |