rails 提供了bootsrap的gem bootstrap-sass
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Bootstrap
gem 'bootstrap-sass'
application.scss
*= require_tree .
*= require_self
*/
@import "bootstrap-sprockets";
@import "bootstrap";
application.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require bootstrap-sprockets