]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/resources/rails_port.rb
Use a writable home directory when running yarn
[chef.git] / cookbooks / web / resources / rails_port.rb
index 6d39b937b8c5d07b60cbd7330aeee120784e3853..6395fb1d53b6aca8600a731a5630cd07eceda6a8 100644 (file)
@@ -405,7 +405,8 @@ action :create do
   execute "#{rails_directory}/package.json" do
     action :nothing
     command "bundle#{new_resource.ruby} exec rake yarn:install"
-    environment "RAILS_ENV" => "production"
+    environment "HOME" => rails_directory,
+                "RAILS_ENV" => "production"
     cwd rails_directory
     user new_resource.user
     group new_resource.group
@@ -416,7 +417,8 @@ action :create do
   execute "#{rails_directory}/app/assets/javascripts/i18n" do
     action :nothing
     command "bundle#{new_resource.ruby} exec rake i18n:js:export"
-    environment "RAILS_ENV" => "production"
+    environment "HOME" => rails_directory,
+                "RAILS_ENV" => "production"
     cwd rails_directory
     user new_resource.user
     group new_resource.group
@@ -427,7 +429,8 @@ action :create do
   execute "#{rails_directory}/public/assets" do
     action :nothing
     command "bundle#{new_resource.ruby} exec rake assets:precompile"
-    environment "RAILS_ENV" => "production"
+    environment "HOME" => rails_directory,
+                "RAILS_ENV" => "production"
     cwd rails_directory
     user new_resource.user
     group new_resource.group