From 4ca605b71b0482c34c735b63b94ed001786c7125 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 15 Aug 2011 15:31:47 -0300 Subject: rake assets:precompile executes in production environment as default if RAILS_ENV was not provided --- actionpack/lib/sprockets/assets.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index 50af88c44f..9b2646b0a2 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -3,9 +3,9 @@ namespace :assets do task :precompile do # We need to do this dance because RAILS_GROUPS is used # too early in the boot process and changing here is already too late. - if ENV["RAILS_GROUPS"].to_s.empty? - ENV["RAILS_GROUPS"] = "assets" - ENV["RAILS_ENV"] ||= "production" + if ENV["RAILS_GROUPS"].to_s.empty? || ENV["RAILS_ENV"].to_s.empty? + ENV["RAILS_GROUPS"] ||= "assets" + ENV["RAILS_ENV"] ||= "production" Kernel.exec $0, *ARGV else Rake::Task["environment"].invoke @@ -24,4 +24,4 @@ namespace :assets do public_asset_path = Rails.public_path + assets.prefix rm_rf public_asset_path, :secure => true end -end \ No newline at end of file +end -- cgit v1.2.3