We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccf400e commit 0fa449aCopy full SHA for 0fa449a
lib/sprockets/railtie.rb
@@ -69,7 +69,11 @@ def configure(&block)
69
Sprockets::Rails::Task.new(app)
70
end
71
72
- def self.build_environment(app)
+ def build_environment(app, initialized: app.initialized?)
73
+ unless initialized
74
+ ::Rails.logger.warn "Application uninitialized: Try calling YourApp::Application.initialize!"
75
+ end
76
+
77
config = app.config
78
env = Sprockets::Environment.new(app.root.to_s)
79
@@ -126,7 +130,7 @@ def self.build_manifest(app)
126
130
127
131
128
132
if config.assets.compile
129
- app.assets = self.build_environment(app)
133
+ app.assets = self.build_environment(app, initialized: true)
134
app.routes.prepend do
135
mount app.assets => config.assets.prefix
136
0 commit comments