Autolab
Autolab copied to clipboard
Remove unnecessary lines from assets.rb
Your environment
master
(c5a0d53
)
Current behavior
Currently, config/initializers/assets.rb
has a list of paths to files that should be precompiled for production. However, it appears that most of them are redundant owing to the use of wildcards such as *.css
and *.js
Besides, having to manually add a line for every new js
or css
file is error-prone.
Expected behavior We should remove unnecessary precompile lines and verify that production autolab still functions.
Comments I haven't been able to get production autolab running using the bare-metal Autolab installation.
We could possibly test this using autolab docker.
Alternatively, we could do the following
- Run
RAILS_ENV=development bundle exec rake assets:precompile
- Check the list of precompiled files in
public/assets
- Removing unnecessary lines, purge the directory
- Run the command again and compare the new list of files
Potential references:
- https://stackoverflow.com/questions/18255716/config-assets-precompile-include-a-folder-of-files-or-kill-the-precompile-fe?noredirect=1&lq=1
- https://stackoverflow.com/questions/10097993/rails-config-assets-precompile-setting-to-process-all-css-and-js-files-in-app-as?noredirect=1&lq=1