Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy are my Rails assets getting precompiled twice?
    text
    copied!<p>I've noticed my assets seem to get compiled twice, which considerably slows down my deployment, as this step is the most time consuming part:</p> <pre><code>~/projects/rewportal(mapwidget ✔) rake assets:precompile /home/ruy/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/ruy/.rvm/gems/ruby-1.9.3-p194@rewportal/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets AssetSync: using /home/ruy/projects/rewportal/config/initializers/asset_sync.rb AssetSync: using /home/ruy/projects/rewportal/config/initializers/asset_sync.rb AssetSync: Syncing. Using: Directory Search of /home/ruy/projects/rewportal/public/assets Uploading: assets/application-5170f52c1dd49cb382d5135bee01d75e.js [...] Fetching files to flag for delete Flagging 8 file(s) for deletion Deleting: assets/active_admin-4ce46d089d4b0080e87c9abcb6fa6c97.css [...] AssetSync: Done. </code></pre> <p>It this normal?</p> <p>When I precompile to other environments (non-production), I can see the detailed compilation of each asset twice:</p> <pre><code>~/projects/rewportal(mapwidget ✔) rake RAILS_ENV=qa assets:precompile --trace ** Invoke assets:precompile (first_time) ** Execute assets:precompile /home/ruy/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/ruy/.rvm/gems/ruby-1.9.3-p194@rewportal/bin/rake assets:precompile:all RAILS_ENV=qa RAILS_GROUPS=assets --trace ** Invoke assets:precompile:all (first_time) ** Execute assets:precompile:all ** Invoke assets:precompile:primary (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment AssetSync: using /home/ruy/projects/rewportal/config/initializers/asset_sync.rb ** Invoke tmp:cache:clear (first_time) ** Execute tmp:cache:clear ** Execute assets:precompile:primary Compiled gmaps4rails/gmaps4rails.base.js (141ms) (pid 8480) Compiled gmaps4rails/gmaps4rails.googlemaps.js (148ms) (pid 8480) [...] Compiled active_admin.css (1299ms) (pid 8480) Compiled active_admin/print.css (113ms) (pid 8480) ** Invoke assets:precompile:nondigest (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment AssetSync: using /home/ruy/projects/rewportal/config/initializers/asset_sync.rb ** Invoke tmp:cache:clear (first_time) ** Execute tmp:cache:clear ** Execute assets:precompile:nondigest Compiled gmaps4rails/gmaps4rails.base.js (133ms) (pid 8480) Compiled gmaps4rails/gmaps4rails.googlemaps.js (133ms) (pid 8480) [...] Compiled active_admin.css (1290ms) (pid 8480) Compiled active_admin/print.css (116ms) (pid 8480) AssetSync: Syncing. Using: Directory Search of /home/ruy/projects/rewportal/public/assets Uploading: assets/active_admin-d05b61ab8366b74eabc9074d3e60fe82.css.gz [...] Fetching files to flag for delete Flagging 6 file(s) for deletion Deleting: assets/active_admin-ec90e7d9a9f45f14d1387f58fa1452b4.css [...] AssetSync: Done. </code></pre> <p>My <code>application.rb</code> has the following:</p> <pre><code>config.assets.precompile += %w( active_admin/print.css active_admin.css active_admin.js admin.js admin.css html5shiv.js ) </code></pre> <p>Ideas?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload