Rails 5 ckeditor gem 未引用已编译的资产名称

Rails 5 ckeditor gem not referencing compiled asset names

我正在尝试在 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 引用的是硬编码资产名称,而不是摘要命名资产。有解决办法吗?

感谢您的帮助, 凯文

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