Skip to content

Instantly share code, notes, and snippets.

@huoxito
Created July 4, 2016 18:24
Show Gist options
  • Save huoxito/b545599b201a32784c61cd2a3a0315a1 to your computer and use it in GitHub Desktop.
Save huoxito/b545599b201a32784c61cd2a3a0315a1 to your computer and use it in GitHub Desktop.
assets:precompile on ci servers
# in config/environments/test.rb
if running_on_ci?
config.assets.compile = true
config.assets.digest = true
end
# cache these two dirs:
# - tmp/cache/assets/test/sprockets
# - public/assets
# before test step compile assets to avoid on the fly compilation
# and very slow first acceptance test for each container
rake assets:precompile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment