-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
The Propshaft integration works without configuration but depends on the entries' Gemfile
order. The detection works when the inline_svg
is listed after propshaft
.
The issue is caused by inline_svg
determining which adapter to use in an after_initialize
block and caching its value too early in the boot process when Propshaft is not ready. I found the call here:
inline_svg/lib/inline_svg/railtie.rb
Line 19 in 1a1e2e0
config.asset_finder = app.instance_variable_get(:@assets) |
Propshaft also uses an after_initialize
block to finalize its configuration, and Rails keeps track of railties in their load order. That's why swapping the gems is a workaround.
A proper fix would be to evaluate asset_finder
when called and once the assets are ready.
euxx, enstyled, bbugh, aaronjensen, juanmferreira93 and 5 more