Issue with upgrade to bootstrap-sass 3.2.0

柔情痞子 提交于 2019-12-14 01:38:04

问题


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...


回答1:


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.



来源:https://stackoverflow.com/questions/24939189/issue-with-upgrade-to-bootstrap-sass-3-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!