Setting Vendor Assets Precompile in Rails 4
Often times you'll need to use some kind of vendor specific files for your Ruby on Rails project. These files can be part of CSS/JavaScript template you use for your project. They can't be stored in your app/assets folder due to pre-processing or CSS files, so it is best to store these files under vendor specific folder. In order to configure assets paths to these files you need to include the following Ruby on Rails lines of code to your config/application.rb file
config.assets.paths << Rails.root.join('vendor', 'assets', 'stylesheets')
config.assets.paths << Rails.root.join('vendor', 'assets', 'javascript')
config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')
config.assets.precompile += %w( .svg .eot .woff .ttf)
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
You can see from the example above that we are adding CSS/JavaScript/Fonts to our project. The main reason you need to do that is Rails 4 does not automatically includes these files from locations such as /vendor/ or /lib/ so you need to direct yourself to add these lines of code. Here is a little bit more info on why this is so: https://github.com/rails/rails/pull/7968