我的Rails 6应用程序使用的是webpack和纱线。我的sass样式表仍然使用asset管道。我正在使用布局css样式表为我的PDF,我与邪恶的PDF生成。我在生产中得到了以下错误,但没有在开发中得到(根据最佳实践,因为配置设置回退到资产管道在生产中是假的):
ActionView::Template::Error (The asset "%22images%2Fui-icons_555555_256x240.png%22" is not present in the asset pipeline.--
<!-- application.pdf.erb, used as my layout for PDFs -->
<head>
<meta charset='utf-8' />
<%= wicked_pdf_stylesheet_link_tag "application" %> <!-- this one is problematic -->
<%= wicked_pdf_stylesheet_link_tag "application_pdf" %>
</head>
<!-- application.scss , line of the error -->>
...
@import "bootstrap/scss/bootstrap" // imported from node_modules, installed with yarn, using webpack
...为什么我在查找ui-icons图像资产时遇到问题?在这里,我到底做错了什么?
发布于 2021-04-20 23:48:14
结果是一些Jquery UI样式表导入导致了一个问题。他们正在做一些时髦的事情,添加引用图像的代码。一旦我删除了JQuery UI导入,一切都运行得很好。
https://stackoverflow.com/questions/67179311
复制相似问题