gpt4 book ai didi

ruby-on-rails - Assets 管道未预编译所需文件

转载 作者:行者123 更新时间:2023-12-04 05:54:04 25 4
gpt4 key购买 nike

我最近在我的 Rails 3.2 应用程序中添加了一个 CSS 文件,但我正在努力处理 Assets 管道。目前,它显示 ActionView::Template::Error(pdf.css 未预编译)

我在我的 app/assets/stylesheets/application.css 文件中添加了一个 = require pdf

还需要什么?

我是否必须将 pdf.css 添加到 config.assets.precompile

如果是,为什么? require 不应该处理它吗?

我的application.css:

/*
*= require_self
*= require chosen
*= require pdf
*= require_tree ./screen
*/

最佳答案

您是否在 html 模板的某处明确要求 pdf.css?

如解释in the official guide to the asset pipeline ,您在 html 中明确需要的每个文件( list 文件之外)都需要通过将它们添加到 config.assets.precompile 来编译。

关于ruby-on-rails - Assets 管道未预编译所需文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13937418/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com