]> git.openstreetmap.org Git - chef.git/commitdiff
Run asset precompilation in the production environment
authorTom Hughes <tom@compton.nu>
Tue, 6 Aug 2013 23:50:23 +0000 (00:50 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 6 Aug 2013 23:50:23 +0000 (00:50 +0100)
cookbooks/web/definitions/rails_port.rb

index a0eb7eb79fd2175e48cf6ed21f9717a5a8696ba8..a51484b1f7dd32bda8e6feb60339004b43c47ad3 100644 (file)
@@ -76,6 +76,7 @@ define :rails_port, :action => [ :create, :enable ] do
   execute "#{rails_directory}/public/assets" do
     action :nothing
     command "rake#{ruby_version} assets:precompile"
   execute "#{rails_directory}/public/assets" do
     action :nothing
     command "rake#{ruby_version} assets:precompile"
+    environment "RAILS_ENV" => "production"
     cwd rails_directory
     user rails_user
     group rails_group
     cwd rails_directory
     user rails_user
     group rails_group