我在Ruby on Rails上使用bootstrap图标和bootstrap-sass。
<span class="glyphicon glyphicon-ok"></span>
它在本地工作正常。但是,我的生产服务器使用apache虚拟主机来重定向url,这意味着我的url从localhost:3000更改为www.foo.com/bar /.
其他一切工作正常(样式表,图片),除非我使用bootstrap图标,浏览器试图从
下载前端(.eot,.woff,.ttf)www.foo.com/assets
而不是
www.foo.com/bar/assets
有没有解决这个问题?
以下是我使用的宝石
gem&#39; rails&#39;,&#39; 4.2.5.1&#39;
gem&#39; sass-rails&#39;
gem&#39; sprockets-rails&#39;
gem&#39; bootstrap-sass&#39;
我的application.css
*= require_self
*= require_tree .
和scaffolds.scss
@import "bootstrap-sprockets";
@import "bootstrap";
@import "bootstrap/theme";
答案 0 :(得分:-1)
application.css需要是application.css
和
@import&#34; bootstrap-sprockets&#34 ;; @import&#34; bootstrap&#34 ;;