I have a weekly generator that zips up some files. Some of them are assets in app/assets/images/xxx.xxx , some of them are loaded through Paperclip and in public/system/env...
The file paths that I run after the app , without /images/ or public .
I will get something like /assets/some.png or /system/production/xyz/some.jpg , and they will be served normally as the path to the URL, but I want to collect them into a file.
How can I get the path to the resource file?
I think this is an easier way to explain this.
Given a string of resource URIs, how can I find and get the path to an asset file?
The URL path of the /assets/logo.png resource can be one of the files:
public/logo.png public/assets/logo.png app/assets/images/logo.png
source share