How do you instruct Sprockets to include files from /vendors/assets/components on Heroku? How do you instruct Sprockets to include files from /vendors/assets/components on Heroku? heroku heroku

How do you instruct Sprockets to include files from /vendors/assets/components on Heroku?


You should be able to tell the pipeline to include extra directories like this:

config.assets.paths << Rails.root.join('vendor', 'assets', 'components')

You may also need to tell it to precompile specific files too, as only the main application.js & application.css are precompiled by default:

config.assets.precompile << %w( frontpage.css frontpage.js *.svg )

With Rails 4 on Heroku you need to add the 12factorapp gem

Finally, if you are using Heroku then for Rails 4 you'll need to add the following Gem

group :production do  gem 'rails_12factor'end

See this question for more information