Ich verwende Rails 4 und Asset-Pipeline. Ich benutze auch Bootstrap 3. In app/assets/stylesheets/material_admin_theme habe ich eine Datei bootstrap.css. Es enthält eine @ font-face Erklärung zu einer Quelldatei:404 Fehlende Schriftart, obwohl Schriftart vorhanden und Pfad zu Schriftart korrekt ist
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../../fonts/glyphicons-halflings-regular.eot');
src: url('../../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
Der Pfad bewegt sich nach oben, zwei Verzeichnisse ../../ zum fonts. So zwei Verzeichnisse nach oben ist Sheets/assets und dann gibt es ein Kind Verzeichnis namens Fonts mit bestimmten Schriftarten:
app/assets/fonts/glyphicons-halflings-regular.ttf
So ist die Quell-URL korrekt an die Schrift führt. Allerdings, wenn ich die Seite zu laden, merke ich, Chrome-Konsole zeigt ein 404:
GET http://localhost:3000/fonts/glyphicons-halflings-regular.ttf 404 (Not Found)
Warum erhalte ich diese 404 Not Found-Nachricht (und damit das Symbol erscheint nicht auf der Seite), wenn die Schriftart vorhanden ist, die Die Quell-URL ist der richtige Pfad?