From 8fc705158847a10c5c928c703e3a12d6f5a49c6d Mon Sep 17 00:00:00 2001 From: f Date: Fri, 24 Dec 2021 10:08:09 -0300 Subject: [PATCH] limpiar gemas al terminar de instalar --- app/models/deploy.rb | 1 + app/models/deploy_local.rb | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/deploy.rb b/app/models/deploy.rb index 3f034ad5..d08aa239 100644 --- a/app/models/deploy.rb +++ b/app/models/deploy.rb @@ -39,6 +39,7 @@ class Deploy < ApplicationRecord site.path end + # XXX: Ver DeployLocal#bundle def gems_dir @gems_dir ||= Rails.root.join('_storage', 'gems', site.name) end diff --git a/app/models/deploy_local.rb b/app/models/deploy_local.rb index 4fa588f5..a4f60e28 100644 --- a/app/models/deploy_local.rb +++ b/app/models/deploy_local.rb @@ -92,7 +92,9 @@ class DeployLocal < Deploy def bundle if Rails.env.production? - run %(bundle install --no-cache --path="#{gems_dir}") + # XXX: Desde que ya no compartimos el directorio de gemas, tenemos + # que hacer limpieza después de instalar. + run %(bundle install --no-cache --path="#{gems_dir}" --clean) else run %(bundle install) end