This blog is part of our Rails 5 series.
As a Rails developer, it was a familiar sign to see assets logs flooding the whole terminal in development mode.
we could include
in our application.
It turns off
the Rails asset pipeline log
in development mode.
quiet_assets is part of Rails 5
Now quiet_assets gem is folded into Rails 5 itself.
A new configuration
which when set to
loads a rack middleware named Sprockets::Rails::QuietAssets.
This middleware checks whether
the current request
matches assets prefix path
and if it does,
it silences that request.
This eliminates the need to add external gem for this.
config.assets.quiet is set to
in development mode. So we don’t have to do anything. It just works out of the box.
Compatibility with older versions of Rails
This functionality has been backported to sprockets-rails 3.1.0 and is available in Rails 4.2.7 as well.