在资产管道中需要树

我的资产管道中有一个名为fontfaces的文件夹。 它无需添加任何application.rb即可application.rb

在目录中我有不同的字体类型,如文件夹中的.eof,.ttf等,就像这样

 Assets Typefaces Eof ...files Ttf ...files 

除非字体是资产/字体,否则它们不会成为资产管道的一部分。 资产管道不会进入子目录。

我如何让资产管道超越资产/字体到资产/字体/ eof,资产/字体/ ttf等?

在你的app/assets/javascripts/application.js文件中,尝试放:

//= require_tree ../Typefaces

查看更多: http : //guides.rubyonrails.org/asset_pipeline.html

如果有效,请告诉我。

在application.css中

 /* *= require_self *= require_tree ./folder_name/ */ 

详细参考: http : //railscasts.com/episodes/279-understanding-the-asset-pipeline? view= asciicast