Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Require tree in asset pipeline

I have a folder in my asset pipeline called typefaces. It works without any additions to application.rb.

In the directory I have different typeface types, like .eof, .ttf, etc in folders, like this

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

Unless the typefaces are in Assets/typefaces they don't become part of asset pipeline. Asset pipeline doesn't go into the subdirectories.

How would I have asset pipeline look beyond assets/typefaces into assets/typefaces/eof, assets/typefaces/ttf etc?

like image 562
Verdi Erel Ergün Avatar asked Oct 28 '12 00:10

Verdi Erel Ergün


2 Answers

In your app/assets/javascripts/application.js file, try putting:

//= require_tree ../Typefaces

See more: http://guides.rubyonrails.org/asset_pipeline.html

Let me know if that works.

like image 163
Kleber S. Avatar answered Oct 06 '22 10:10

Kleber S.


In application.css

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

*/

Detailed Reference: http://railscasts.com/episodes/279-understanding-the-asset-pipeline?view=asciicast

like image 36
Taimoor Changaiz Avatar answered Oct 06 '22 09:10

Taimoor Changaiz