mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 12:31:42 +00:00
fix: asegurarse que las gemas están instaladas
This commit is contained in:
parent
47f1a8e530
commit
e258e6e2d9
1 changed files with 9 additions and 2 deletions
|
@ -56,8 +56,8 @@ class Site < ApplicationRecord
|
||||||
before_destroy :remove_directories!
|
before_destroy :remove_directories!
|
||||||
# Carga el sitio Jekyll una vez que se inicializa el modelo o después
|
# Carga el sitio Jekyll una vez que se inicializa el modelo o después
|
||||||
# de crearlo
|
# de crearlo
|
||||||
after_initialize :load_jekyll
|
after_initialize :install_gems, :load_jekyll
|
||||||
after_create :load_jekyll
|
after_create :install_gems, :load_jekyll
|
||||||
# Cambiar el nombre del directorio
|
# Cambiar el nombre del directorio
|
||||||
before_update :update_name!
|
before_update :update_name!
|
||||||
before_save :add_private_key_if_missing!
|
before_save :add_private_key_if_missing!
|
||||||
|
@ -515,4 +515,11 @@ class Site < ApplicationRecord
|
||||||
def run_in_path(&block)
|
def run_in_path(&block)
|
||||||
Dir.chdir path, &block
|
Dir.chdir path, &block
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def install_gems
|
||||||
|
return unless persisted?
|
||||||
|
return if Rails.root.join('_storage', 'gems', name).directory?
|
||||||
|
|
||||||
|
deploys.find_by_type('DeployLocal').send(:bundle)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue