-
Notifications
You must be signed in to change notification settings - Fork 186
spree_fancy theme assets not being sync'd #61
Comments
Updated this to remove the loop and only keep the explicit naming of the assets that need precompiled. This fixes the $c_green failure I was seeing in #41 |
@hexcodejosh So what are the steps to reproduce this issue? |
Basically, install spree + spree_fancy, push to heroku, and use assets_sync to save assets to amazon s3. spree's built in s3 support handles products' assets correctly, but doesn't by itself seem to handle precompiled assets. The consensus on the web seemed to be to use asset_sync as well to upload all assets to s3 during the precompile phase. Once you get that far, installing spree_fancy will work locally, and will appear to work on heroku as well (no errors during precompile)... but I found that many of the spree_fancy assets (icons, bx_loader.gif, etc) would return 404 on page load. The most visible problem was the shopping cart and other icons showed up as empty boxes (in chrome). Soooooooo..... it must be the combination of trying to do all of these things at once that exposes the issue. The fix I'm proposing calls out the assets that spree_fancy provides, adds them to the precompiled asset array, so that when assets:precompile is run, they are picked up and compiled along with all the other assets. Once they're in that pipeline, then asset_sync picks them up and uploads them to s3, and everything works after that point. |
For reference, my current Gemfile is:
|
I've have spree working on heroku, and have been using asset_sync to sync the precompiled assets. I noticed after installing spree_fancy that spree_fancy's assets were not being sync'd. I originally thought it was a bug in asset_sync, but instead have traced it down to what looks like a bug in spree_fancy. It doesn't appear that any of the assets are being added to config.assets.precompile array.
Hacking around, I added the following to lib/spree_fancy/engine.rb:
I'm not sure if the manual entries or the loop are doing the job (blush) but this fixes my issue -- the precompiled assets are then picked up by asset_sync. It seems pretty clear that the assets are not making it into the list.
Can anyone validate what I'm seeing? Is this this "right" place to make the fix? If so, I can create a fork, clean it up, and push back a fix.
Let me know & thanks for looking...
The text was updated successfully, but these errors were encountered: