Dangers of using *=require_tree . in the asset pipeline

be aware that when using *=require_tree . 

it will load everything, in the alphabetic order. This caused a lot of headaches to me!!!

It is better to remove it and load each item separately!

good luck

Advertisements

2 thoughts on “Dangers of using *=require_tree . in the asset pipeline

  1. Alex says:

    Actually all you have to do is add require statements to your individual modules. For example, say you //= require_tree . and you have module A and module B. Module A depends on module B so you want to load module B first. All you have to do is add //=require B at the top of module A and rails will re-order your assets.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s