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:
|
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.
The Propshaft integration works without configuration but depends on the entries'
Gemfileorder. The detection works when theinline_svgis listed afterpropshaft.The issue is caused by
inline_svgdetermining which adapter to use in anafter_initializeblock 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
Propshaft also uses an
after_initializeblock 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_finderwhen called and once the assets are ready.