How to precompile assets on rails in a development environment?

I want to manually precompile some assets in my dev environment (to check the contents of compiled js and css files) from the command line.

I run

RAILS_ENV=development bundle exec rake assets:precompile

but my js and css are not compiled in the public / assets folder, only images. Any idea why this might happen?

+6
source share
1 answer

Try adding this to your config/environments/production.rb :

 config.assets.precompile += %w( *.css *.js ) 
+5
source

Source: https://habr.com/ru/post/912805/


All Articles