Rails Engine assests are not precompiled
<p>I am studying rails and using the engines with rails.
In production mode, rails did not load compiled assets of engines,
although I have executed:</p>

<pre><code>$ RAILS_ENV=production bundle exec rake assets:clean assets:precompile
</code></pre>

<p>Please help if anyone knows the issue.</p>

<p>My settings are as below:</p>

<p><strong>environment/production.rb</strong></p>

<pre><code>config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_files = false 
config.assets.compile = false 
config.assets.digest = true
config.log_level = :debug
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
config.log_formatter = ::Logger::Formatter.new`
</code></pre>

<p><strong>engine/xxx/lib/xxx/engine.rb</strong></p>

<p>Engines's option is -- mountable</p>

<pre><code> module Moderna  
  class Engine &lt; ::Rails::Engine  
    isolate_namespace xxx

    # parent company asset precompile
    initializer "xxx.assets.precompile" do |app|

      app.config.assets.paths &lt;&lt; Rails.root.join("app", "assets", "fonts")

      app.config.assets.precompile &lt;&lt; %w(
        xxx/*.css xxx/fancybox/*.css xxx/skin/*.css xxx/google-code-prettify/*.css
        xxx/*.js xxx/flexslider/*.js xxx/google-code-prettify/*.js
        xxx/portfolio/*.js xxx/quicksand/*.js
        xxx/*.svg xxx/*.eot xxx/*.woff xxx/*.ttf
        xxx/customicon/*.svg xxx/customicon/*.eot xxx/customicon/*.woff xxx/customicon/*.ttf
      )

      app.config.assets.precompile &lt;&lt; /\.(?:svg|eot|woff|ttf)\z/
    end
  end
end
</code></pre>