我无法弄清楚如何将wrap bootstrap文件集成到我的Rails 4应用程序中。Rails 4 - 供应商资产字体文件
我的供应商资产中有一个名为fonts的文件夹。
在这里面我有几个文件上被称为如下:
ActionController::RoutingError (No route matches [GET] "/assets/vendor/assets/fonts/Simple-Line-Icons.woff"):
我我的供应商/资产/样式表,我有一个文件叫做简单线路icons.css,其中有:
@font-face {
font-family: 'Simple-Line-Icons';
src:url('vendor/assets/fonts/Simple-Line-Icons.eot');
src:url('vendor/assets/fonts/Simple-Line-Icons.eot?#iefix') format('embedded-opentype'),
url('vendor/assets/fonts/Simple-Line-Icons.woff') format('woff'),
url('vendor/assets/fonts/Simple-Line-Icons.ttf') format('truetype'),
url('vendor/assets/fonts/Simple-Line-Icons.svg#Simple-Line-Icons') format('svg');
font-weight: normal;
font-style: normal;
}
当我保存一切,预编译的资产,我的控制台错误日志显示:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/assets/vendor/assets/fonts/Simple-Line-Icons.ttf Failed to load resource: the server responded with a status of 404 (Not Found)
有人能看到什么ñ发生碰巧得到这个工作?
考虑下面的建议,我现在有:
@font-face {
font-family: 'Simple-Line-Icons';
/*src:url('vendor/assets/fonts/Simple-Line-Icons.eot');*/
src:asset-url("fonts/Simple-Line-Icons.eot");
src:asset-url("fonts/Simple-Line-Icons.eot?#iefix") format('embedded-opentype'),
asset-url("fonts/Simple-Line-Icons.woff") format('woff'),
asset-url("fonts/Simple-Line-Icons.ttf") format('truetype'),
asset-url("fonts/Simple-Line-Icons.svg#Simple-Line-Icons") format('svg');
内简单线icons.css.erb
,但我仍然得到404错误
嗨,我试过了,并显示在上面的尝试。我仍然在文件上收到404错误 – Mel
您是否处于生产模式或开发模式下? –
开发模式 – Mel