简体   繁体   English

在轨道上使用ruby引导静态资产

[英]bootstrap static assets with ruby on rails

In bootstrap.css there is a line 在bootstrap.css中有一行

  background-image: url("../img/glyphicons-halflings.png");

What should I replace this url to make it work with ruby on rails 我该怎么替换这个url才能使它在rails上使用ruby

您应该使用适当的gem而不是自己链接twitter bootstrap。

In case you would like to modify your bootstrap.css to work with asset-pipeline in Rails , you have to find and replace all references of kind "../img/glyphicons-halflings.png" to : 如果您想修改您的bootstrap.css以在Rails中使用asset-pipeline,您必须找到并替换所有类型为"../img/glyphicons-halflings.png"引用:

url(gliphicons-halflings.png) 

Make sure , that your .png files are in a directory managed by asset-pipeline , like explained in this Rails guide . 确保您的.png文件位于由资产管道管理的目录中,如本Rails指南中所述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM