fphilipe / premailer-rails

CSS styled emails without the hassle.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FileSystemLoader not finding assets when relative_url_root is set

mauriciomenegaz opened this issue · comments

Hello,
I have an application which is deployed to a subdir, setting the relative_url_root parameter.
This issue is similar to what was addressed by #93, but in my case the asset pipeline is not available in production (the assets are being served by nginx).

The assets can be found in the file system, in the public directory. The problem is that the FileSystemLoader looks at public/assets/<relative_url_root>/asset_name.css, instead of public/assets/asset_name.css

The solution would be to modify the FileSystemLoader to remove the prefix from the path, similar to what is done in AssetPipelineLoader. I can make a pull request for that, if it's ok.

Hi!

The solution would be to modify the FileSystemLoader to remove the prefix from the path, similar to what is done in AssetPipelineLoader. I can make a pull request for that, if it's ok.

Sounds good 😊 👍