到目前为止,我一直在本地环境中加载我的 css 文件,而没有像这样进行预编译:
= stylesheet_link_tag "bootstrap.min", :media => "all"
= stylesheet_link_tag "bootstrap-responsive.min", :media => "all"
= stylesheet_link_tag "font-awesome.min", :media => "all"
= stylesheet_link_tag "ace.min", :media => "all"
= stylesheet_link_tag "ace-responsive.min", :media => "all"
= stylesheet_link_tag "ace-skins.min", :media => "all"
= stylesheet_link_tag "datepicker", :media => "all"
但是我现在想将其更改为预编译...所以我在 application.css 中执行了此操作:
/*
*= require bootstrap.min
*= require bootstrap-responsive.min
*= require font-awesome.min
*= require ace.min
*= require ace-responsive.min
*= require ace-skins.min
*= require datepicker
*/
但是,它会在 html 中加载 css 文件:
<link href="/assets/bootstrap.min.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/bootstrap-responsive.min.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/font-awesome.min.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/ace.min.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/ace-responsive.min.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/ace-skins.min.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/datepicker.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
最后一行加载 application.css 搞砸了 css,我不知道如何摆脱它。没有它,它看起来很完美。我没有明确加载它..只是用它来加载资产。我如何阻止最后一行加载?它会自动出现而不在 application.css 中调用它