我是ruby中的新手,我的代码看起来像这样:这是正确的吗?我的boostrap无法加载..
所以 application.scss
//= require .
//= require_self
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap
//= require_tree .
@import "bootstrap-sprockets";
@import "bootstrap";
application.js 如下所示:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap-sprockets
//= require_tree .
感谢您的解释!
答案 0 :(得分:0)
在sass文件中我们不包含require,你可以删除它们。用如下代码替换你的代码
@import "bootstrap-sprockets";
@import "bootstrap";