Tuesday, May 15, 2012

Invalid CSS issue on RAILS_ENV=production bundle exec rake --trace assets:precompile

1)Remove all the requires in app/assets/application.css file

2)Now add config.assets.precompile = ['*.css'] in application.rb file

3)Now run RAILS_ENV=production bundle exec rake --trace assets:precompile which will help to trace the exact files where the css issue exist and then fix all the issues mentioned in the css files

4) When all the css issues are fixed then remove config.assets.precompile = ['*.css'] and then revert any requires in your application.css which was present earlier and run the RAILS_ENV=production bundle exec rake --trace assets:precompile again. This should fix the issue.

No comments:

Post a Comment