gpt4 book ai didi

ckeditor - 不可能在生产中看到 CKeditor

转载 作者:行者123 更新时间:2023-12-02 14:29:15 30 4
gpt4 key购买 nike

我有一个使用 CKeditor 的 Rails 4 应用程序。在开发模式下它工作正常,但在生产中 ckeditor 不会出现,并且文本区域的位置有一个空格。

根据日志,缺少以下文件:

ActionController::RoutingError (No route matches [GET] "/assets/ckeditor/styles.js")

如果我预编译 Assets ,我可以看到生成的以下文件:

public/assets/ckeditor/styles-65fee53acf063b3d207bc00b4f7ce0d5.js

这是我的 application.rb 的 ckeditor 行:

config.assets.precompile += Ckeditor.assets

看起来这就是 CKeditor 想要的文件,但它并不是在寻找预编译的文件。我该如何解决这个问题?

最佳答案

我已经预编译了我的 Assets 并将我的存储库推送到生产服务器并遇到了类似的错误。并且 ckeditor 没有加载。

以下对我有用:

1) 在 config >environment >productio.rb 文件下有一行 config.assets.compile = false

我将 false 更改为 true 并将代码推送到生产站点。停下来又开始 unicorn 。现在 ckeditor 正在加载,这就成功了。

希望有帮助。

关于ckeditor - 不可能在生产中看到 CKeditor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18045369/

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