将bootstrap-sass gem升级到〜>时是否还有其他需要参考/配置的内容? 3.2.0 ?
使用RubyMine 6.3作为编辑器,并在Gemfile中使用以下内容:
ruby'2.1.2' gem'rails','4.1.1' gem'sass-rails','〜> 4.0.3' gem'bootstrap-sass','3.1.1.1'app /assets/stylesheets/application.css.scss将对
@import'bootstrap'感到满意;但是,一旦bootstrap-sass gem升级到当前版本通过将Gemfile引用更改为(然后运行软件包更新):
gem'bootstrap-sass','〜> 3.2.0'RubyMine现在发布了 @import'bootstrap'; 语句,说无法解决导入sass / scss文件的问题 。
twbs / bootstrap-sass安装文档似乎无法推断出还需要其他任何东西...
解决方案删除所有* = require_self和* = require_tree。 sass文件中的语句。而是使用@import导入Sass文件。
请勿在Sass中使用* = require,否则您的其他样式表将无法访问Bootstrap混合或变量。 / p>
Is there something else that needs to be referenced/configured when upgrading the bootstrap-sass gem to ~> 3.2.0?
Using RubyMine 6.3 as the editor and the following in the Gemfile:
ruby '2.1.2' gem 'rails', '4.1.1' gem 'sass-rails', '~> 4.0.3' gem 'bootstrap-sass', '3.1.1.1'app/assets/stylesheets/application.css.scss will be happy with
@import 'bootstrap';However, once the bootstrap-sass gem is upgraded to its current version by changing the Gemfile reference to (and then running bundle update):
gem 'bootstrap-sass', '~> 3.2.0'RubyMine now has issues the @import 'bootstrap'; statement, saying "Cannot resolve import into sass/scss file".
The twbs/bootstrap-sass installation docs don't seem to infer that anything else is needed...
解决方案Remove all the *= require_self and *= require_tree . statements from the sass file. Instead, use @import to import Sass files.
Do not use *= require in Sass or your other stylesheets will not be able to access the Bootstrap mixins or variables.
更多推荐
升级到bootstrap
发布评论