From a66039e8fc9290890e6ea172492f39f3253d69dd Mon Sep 17 00:00:00 2001 From: f Date: Sat, 3 Oct 2020 21:44:54 -0300 Subject: [PATCH] deploy en desarrollo --- app/models/deploy.rb | 2 +- app/models/deploy_local.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/deploy.rb b/app/models/deploy.rb index 6f1f737..a5dd153 100644 --- a/app/models/deploy.rb +++ b/app/models/deploy.rb @@ -40,7 +40,7 @@ class Deploy < ApplicationRecord end def gems_dir - Pathname.new(File.join(home_dir, '..', 'gems')).realpath.to_s + ENV.fetch('GEMS_DIR', Pathname.new(File.join(home_dir, '..', 'gems')).realpath.to_s) end # Corre un comando y devuelve true si terminó correctamente diff --git a/app/models/deploy_local.rb b/app/models/deploy_local.rb index aeeb603..3e1b823 100644 --- a/app/models/deploy_local.rb +++ b/app/models/deploy_local.rb @@ -82,7 +82,11 @@ class DeployLocal < Deploy end def bundle - run %(bundle install --no-cache --path="#{gems_dir}") + if Rails.env.production? + run %(bundle install --no-cache --path="#{gems_dir}") + else + run %(bundle install) + end end def jekyll_build