When using the sprockets-rails gem version 3.0.0 or above and have Rails.application.config.assets.compile set to false the embedded_svg helper will fail because Rails.application.assets will return nil and therefore can't find the asset.
There are a bunch of different ways to handle this. Personally I used a modified version of the code provided here to get around this issue and return the proper filepath to be opened. But I guess since this helper method is only being used for alert-icon.svg it might be easier to just get rid of the helper method altogether?
When using the
sprockets-railsgem version 3.0.0 or above and haveRails.application.config.assets.compileset tofalsetheembedded_svghelper will fail becauseRails.application.assetswill returnniland therefore can't find the asset.There are a bunch of different ways to handle this. Personally I used a modified version of the code provided here to get around this issue and return the proper filepath to be opened. But I guess since this helper method is only being used for
alert-icon.svgit might be easier to just get rid of the helper method altogether?