diff --git a/app/models/deploy.rb b/app/models/deploy.rb index 6f1f7374..a5dd1537 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 aeeb603c..3e1b8234 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