【发布时间】:2017-02-02 23:44:58
【问题描述】:
Bootstrap 没有为我加载。我做错了什么?
application.scss(完整文件,没有其他内容)
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
@import "bootstrap-sprockets";
@import "bootstrap";
@import "bootstrap/theme";
宝石文件
gem 'bootstrap', '~> 4.0.0.alpha4'
gem 'bootstrap-sass', '~> 3.1.1'
gem 'bootstrap-sass-extras'
HTML IN HEADER SHOWS(运行 rails s,处于开发模式):
<link rel="stylesheet" media="all" href="/stylesheets/application.css">
【问题讨论】:
-
试试
bootstrap/scss/bootstrap -
是的,不起作用。
-
为什么你包含 3 个不同的宝石,只是
gem 'bootstrap-sass', '~> 3.1.1'对你有用? -
在未加载时继续添加它们。我从 gem 'bootstrap-sass-extras' 开始,只是删除了 bootstrap,但仍然无法正常工作。
标签: ruby-on-rails twitter-bootstrap ruby-on-rails-4 sass rubygems