diff --git a/app/models/site.rb b/app/models/site.rb index 6693c1d2..3e88d628 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -568,6 +568,7 @@ class Site < ApplicationRecord if !gems_installed? || gemfile_updated? || gemfile_lock_updated? deploy_local.bundle touch + File.touch(gemfile_path) end end @@ -588,7 +589,11 @@ class Site < ApplicationRecord # Detecta si el Gemfile fue modificado def gemfile_updated? - updated_at < File.mtime(File.join(path, 'Gemfile')) + updated_at < File.mtime(gemfile_path) + end + + def gemfile_path + @gemfile_path ||= File.join(path, 'Gemfile') end # @return [String]