我安装了bootstrap但是我的rails应用程序无法正常工作。 我的application.css
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/
custom.css.scss
@import "bootstrap-sprockets";
@import "bootstrap";
的Gemfile
gem 'bootstrap-sass', '~> 3.3.7'
gem 'sass-rails', '~> 5.0'
gem 'autoprefixer-rails'
gem 'sprockets-rails', '~> 3.2.1'
的application.js
//= require rails-ujs
//= require bootstrap-sprockets
//= require turbolinks
//= require_tree .