【问题标题】:Rails 5 ckeditor gem not referencing compiled asset namesRails 5 ckeditor gem 未引用已编译的资产名称
【发布时间】:2018-10-15 01:28:19
【问题描述】:

我正在尝试在 Rails 5 应用程序中使用 ckeditor gem。我将编译路径添加到 config/initializers/assets.rb:

Rails.application.config.assets.precompile += Ckeditor.assets

我可以看到它可以正确编译。问题是,在生产中,我得到 404 错误(在开发中工作正常):

Failed to load resource: the server responded with a status of 404 :assets/ckeditor/config.js?t=GB8C:1 

这告诉我 ckeditor gem 引用的是硬编码的资产名称,而不是摘要命名的资产。有解决办法吗?

感谢您的帮助, 凯文

【问题讨论】:

标签: ruby-on-rails ckeditor asset-pipeline


【解决方案1】:

很久以前我遇到过同样的问题,最后使用这个 gem github.com/alexspeller/non-stupid-digest-assets 来跳过 ckeditor 资产的摘要(我对其他需要资产的 gem 也这样做也)。这不是最好的解决方案,但对我来说,我从不更改 ckeditor 资产,实际上并不需要摘要。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-07
    • 2013-12-25
    • 1970-01-01
    • 2018-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多