aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets/assets.rake
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-24 01:56:49 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-24 03:17:23 +0200
commiteb367afeed2905d1036f46940aa6c91323f7faab (patch)
treeff1b4c849fc21fbb53a992af4ce0439a98defb54 /actionpack/lib/sprockets/assets.rake
parent096717e6f7ee654639ea141ecd1359f0ca30f71b (diff)
downloadrails-eb367afeed2905d1036f46940aa6c91323f7faab.tar.gz
rails-eb367afeed2905d1036f46940aa6c91323f7faab.tar.bz2
rails-eb367afeed2905d1036f46940aa6c91323f7faab.zip
`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
Diffstat (limited to 'actionpack/lib/sprockets/assets.rake')
-rw-r--r--actionpack/lib/sprockets/assets.rake3
1 files changed, 2 insertions, 1 deletions
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