-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assets.compress could be documented better #18057
Comments
I would offer a pull request but I imagine it would be rewritten. I also want to point out that this statement in
In fact, if you set |
In 4.2 setting |
This issue has been automatically marked as stale because it has not been commented on for at least The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the Thank you for all your contributions. |
This issue has been automatically closed because of inactivity. If you can still reproduce this error on the Thank you for all your contributions. |
I think there are some places in the docs where it still gives the impression that the
config.compress
flag does something. I also don't think it's completely clear thatnil
is a legitimate option to pass tojs_compressor
, and that is is in fact the default for everything but prod. Not only is it legitimate, but it is a really good idea in development which is presumably why it is the default. The strange thing is that if you you setconfig.assets.debug = true
, it will look like your javascript has not been compressed (because all assets are fetched with thebody=1
query param), but in fact, sprockets will still have gone and uglified your entireapplication.js
file in the process of checking for errors. Addtherubyracer
, which appears to slow down execjs by a factor of 3 (at least on my box) and reload times for an ember app become ridiculous. Having spent a few hours figuring this all out, it would be great if other's who have upgraded to rails4 wouldn't have to experience to this. Perhaps the upgrade guide should make it clear that you should really setassets.js_compressor = nil
in development.Here are the doc issues:
From upgrading_ruby_on_rails.md (https://github.com/rails/rails/blob/master/guides/source/upgrading_ruby_on_rails.md#sprockets-rails)
assets:precompile:primary
andassets:precompile:all
have been removed. Useassets:precompile
instead.config.assets.compress
option should be changed toconfig.assets.js_compressor
like so for instance:configuring.md, still reads:
In asset_pipeline.md, it still says:
The text was updated successfully, but these errors were encountered: