sstephenson / sprockets

Rack-based asset packaging system
2.55k stars 24 forks source link

Added a "paths" rake task #707

Closed iainbeeston closed 9 years ago

iainbeeston commented 9 years ago

This rake task prints out the paths in the order that they are defined, to aid debugging load path issues.

I've had problems recently when I've had multiple versions of the same library in my asset paths, and found out that I've been loading the wrong one (for example, if you use more than one gem that includes jquery.js). I think that having a rake task to print out the asset paths would be very useful for this reason.

josh commented 9 years ago

While this is interesting, I don't think its going to be that discoverable and go mostly unused.

I think you're better off just poping open script/console and checking Rails.application.assets.paths.

Thanks though.

iainbeeston commented 9 years ago

Ah that's a shame. I'd argue that rake -T makes this easier to discover than Rails.application.assets.paths, but I admit it's not something most users have a need for.