我無法弄清楚如何將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