---
title: "Rails 5 silences assets logs in dev mode by default"
description:
  "quiet_assets gem used for silencing logging of assets in the development mode
  is now part of Rails 5"
canonical_url: "https://www.bigbinary.com/blog/rails-5-silences-assets-logs-in-development-mode-by-default"
markdown_url: "https://www.bigbinary.com/blog/rails-5-silences-assets-logs-in-development-mode-by-default.md"
---

# Rails 5 silences assets logs in dev mode by default

quiet_assets gem used for silencing logging of assets in the development mode is
now part of Rails 5

- Author: Midhun Krishna
- Published: September 2, 2016
- Categories: Rails 5, Rails

As a Rails developer, it was a familiar sign to see assets logs flooding the
whole terminal in development mode.

```plaintext
Started GET "/assets/application.self-4a04ce68c5ebf2d39fba46316802f17d0a73fadc4d2da50a138d7a4bf2d26a84.css?body=1" for 127.0.0.1 at 2016-09-02 10:23:04 +0530
Started GET "/assets/bootstrap/transition.self-6ad2488465135ab731a045a8ebbe3ea2fc501aed286042496eda1664fdd07ba9.js?body=1" for 127.0.0.1 at 2016-09-02 10:23:04 +0530
Started GET "/assets/bootstrap/collapse.self-2eb697f62b587bb786ff940d82dd4be88cdeeaf13ca128e3da3850c5fcaec301.js?body=1" for 127.0.0.1 at 2016-09-02 10:23:04 +0530
Started GET "/assets/jquery_ujs.self-e87806d0cf4489aeb1bb7288016024e8de67fd18db693fe026fe3907581e53cd.js?body=1" for 127.0.0.1 at 2016-09-02 10:23:04 +0530
Started GET "/assets/jquery.self-660adc51e0224b731d29f575a6f1ec167ba08ad06ed5deca4f1e8654c135bf4c.js?body=1" for 127.0.0.1 at 2016-09-02 10:23:04 +0530
```

Fortunately, we could include `quiet_assets` gem in our application. It turns
off the Rails asset pipeline log in development mode.

```plaintext
Started GET "/assets/application.js" for 127.0.0.1 at 2016-08-28 19:35:34
```

### quiet_assets is part of Rails 5

Now quiet_assets gem is folded into Rails 5 itself.

A new configuration `config.assets.quiet` which when set to `true`,
[loads a rack middleware named Sprockets::Rails::QuietAssets](https://github.com/rails/sprockets-rails/pull/355).
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.

By default,
[`config.assets.quiet` is set to `true`](https://github.com/rails/rails/pull/25351)
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](https://github.com/rails/rails/pull/25397) as well.

## Links

- [Human page](https://www.bigbinary.com/blog/rails-5-silences-assets-logs-in-development-mode-by-default)
