From 490c5a223609aef486888fcf51b7617b3643f3db Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 3 Dec 2019 10:13:32 -0600 Subject: [PATCH] Add Wipe Out All Precompiled Assets as a rails til --- README.md | 3 ++- rails/wipe-out-all-precompiled-assets.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 rails/wipe-out-all-precompiled-assets.md diff --git a/README.md b/README.md index 27af9ef..7c9d4fd 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_882 TILs and counting..._ +_883 TILs and counting..._ --- @@ -560,6 +560,7 @@ _882 TILs and counting..._ - [Truncate Almost All Tables](rails/truncate-almost-all-tables.md) - [Update Column Versus Update Attribute](rails/update-column-versus-update-attribute.md) - [Where Am I In The Partial Iteration?](rails/where-am-i-in-the-partial-iteration.md) +- [Wipe Out All Precompiled Assets](rails/wipe-out-all-precompiled-assets.md) - [Write Safer Where Clauses With Placeholders](rails/write-safer-where-clauses-with-placeholders.md) ### React diff --git a/rails/wipe-out-all-precompiled-assets.md b/rails/wipe-out-all-precompiled-assets.md new file mode 100644 index 0000000..f6ac0b3 --- /dev/null +++ b/rails/wipe-out-all-precompiled-assets.md @@ -0,0 +1,19 @@ +# Wipe Out All Precompiled Assets + +You can clean up precompiled assets using: + +```bash +$ rails assets:clean +``` + +This command is built to be safe for situations like rolling deploys. Any +assets that are still being used will not be cleaned up. + +If you really want to wipe out _all_ precompiled assets, you should _clobber_ +them: + +```bash +$ rails assets:clobber +``` + +[source](https://edgeguides.rubyonrails.org/command_line.html#rails-assets)