diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-15 15:31:47 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-15 15:31:47 -0300 |
commit | 4ca605b71b0482c34c735b63b94ed001786c7125 (patch) | |
tree | 450daea5c43d3ef5dc2466745926c9ce9ea17915 /actionpack | |
parent | b01cc2241cec0162b978a000e55bd4b806d1667a (diff) | |
download | rails-4ca605b71b0482c34c735b63b94ed001786c7125.tar.gz rails-4ca605b71b0482c34c735b63b94ed001786c7125.tar.bz2 rails-4ca605b71b0482c34c735b63b94ed001786c7125.zip |
rake assets:precompile executes in production environment as default if RAILS_ENV was not provided
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/sprockets/assets.rake | 8 |
1 files changed, 4 insertions, 4 deletions
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 |