Thursday, February 18, 2016

rails local assets precompile

if you have spring, you may not run bin/rake or bin/rails assets:precompile.

here is a way todo it right

RAILS_ENV=production bundle exec rake assets:precompile

ensure that you have (config/application.rb) set
config.assets.initialize_on_precompile = false

and for development:
config.assets.prefix = '/dev-assets' # to avoid assets precompile everytime u change a css or js