From eb367afeed2905d1036f46940aa6c91323f7faab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 24 Sep 2011 01:56:49 +0200 Subject: `rake assets:precompile` loads the application but does not initialize it. To the app developer, this means configuration add in config/initializers/* will not be executed. Plugins developers need to special case their initializers that are meant to be run in the assets group by adding :group => :assets. Conflicts: railties/CHANGELOG railties/test/application/assets_test.rb --- actionpack/lib/sprockets/assets.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/sprockets/assets.rake') diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index 7241671db0..5dd48fea98 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -11,8 +11,9 @@ namespace :assets do ENV["RAILS_ENV"] ||= "production" Kernel.exec $0, *ARGV else - Rake::Task["environment"].invoke Rake::Task["tmp:cache:clear"].invoke + Rails.application.initialize!(:assets) + Sprockets::Bootstrap.new(Rails.application).run # Ensure that action view is loaded and the appropriate sprockets hooks get executed ActionView::Base -- cgit v1.2.3