私はRails 4とアセットパイプラインを使用しています。私はまた、ブートストラップ3を使用しています.app/assets/stylesheets/material_admin_themeでは、私はファイルbootstrap.cssを持っています。これは、ソースファイルに@ font-face宣言を含んでいます404フォントが存在し、フォントへのパスが正しくても、フォントが欠けています
@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');
}
パスはfontsディレクトリに../../ 2つのディレクトリを上に移動します。だから、二つのディレクトリアップは、スタイルシート/資産であると、指定したフォントでフォントと呼ばれる子ディレクトリがあります:
app/assets/fonts/glyphicons-halflings-regular.ttf
だから、元のURLが正しくフォントにつながるん。フォントが存在する場合に
GET http://localhost:3000/fonts/glyphicons-halflings-regular.ttf 404 (Not Found)
なぜ私はこの404見つからないメッセージを取得しています(その結果、アイコンがページに表示されません):私は、ページをロードするときしかし、私はクロームコンソール404が示して気づきますソースURLは正しいパスですか?