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 a0eb7eb..a51484b 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"
+    environment "RAILS_ENV" => "production"
     cwd rails_directory
     user rails_user
     group rails_group