I think there is a reasonable way to achieve your goal using sprockets . Perhaps some require_directory instead of require_tree .
But the most immediate is to remove these points from your resource paths. To achieve this, add this to the very end of your application.rb file (does not work in the initializer):
class Engine < Rails::Engine initializer "remove assets directories from pipeline" do |app| app.config.assets.paths = app.config.assets.paths - app.config.assets.paths.grep(/nice_regexp_here_to_match_the_dir_where_the_unwanted_files_live/) end end
Just tried to hack: put the code in the initializer , but require it at the end of your application.rb :
require "config/initializers/your_file'
I prefer very specific code to be visible this way.
source share