在我的rails 4項目css中使用字體文件。所以他們需要額外的預編譯。預編譯沒有md5指紋的特定資產
我達到與添加下列行來配置/環境/ production.rb
# Add the fonts path
config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts','fonts')
#
# # Precompile additional assets
config.assets.precompile += %w(*.svg *.eot *.woff *.ttf)
和運行耙資產:預編譯的生產。
然而,結果如下:
I, [2013-10-10T19:27:51.931963 #16052] INFO -- : Writing /var/lib/openshift/521e19c85004460a8e000107/app-root/runtime/repo/public/assets/fonts/glyphicons-halflings-regular-ab2f6984951c07fd89e6afdefabd93c7.eot
I, [2013-10-10T19:27:51.940615 #16052] INFO -- : Writing /var/lib/openshift/521e19c85004460a8e000107/app-root/runtime/repo/public/assets/fonts/glyphicons-halflings-regular-24dfb40c91db789b8b8faba6886ac1ef.svg
I, [2013-10-10T19:27:51.950685 #16052] INFO -- : Writing /var/lib/openshift/521e19c85004460a8e000107/app-root/runtime/repo/public/assets/fonts/glyphicons-halflings-regular-4b2130768da98222338d1519f9179528.ttf
I, [2013-10-10T19:27:51.983230 #16052] INFO -- : Writing /var/lib/openshift/521e19c85004460a8e000107/app-root/runtime/repo/public/assets/fonts/glyphicons-halflings-regular-7a07f26f72466361ac9671de2d33fd1c.woff
和CSS文件是指字體文件沒有這個MD5指紋。
我該如何預編譯資產,以便它們在沒有md5指紋的情況下生成?或者我應該把它們放在公共/字體/文件夾在這種情況下?
你解決了嗎?我有同樣的問題.. –
我的答案是否有效? – Ludovic