gpt4 book ai didi

rails_admin 找不到 ckeditor.js 文件

转载 作者:行者123 更新时间:2023-12-03 17:52:01 24 4
gpt4 key购买 nike

我正在尝试在 DigitalOcean 服务器上的 Rails 4.0 中使用 ckeditor (4.0.6) 和 Using rails_admin (0.5.0)。

我将它包含在 rails_admin.rb 初始化程序中,如下所示,它在我本地的生产模式下工作

  config.model Faq do
field :display_order
field :question
field :answer, :ck_editor
end

但是在 DigitalOcean 上,当我进入 Rails_Admin 并尝试创建一个新的 FAQ 对象时,它不会加载 ckeditor,因为它找不到 js。
 http://dummy.com/assets/ckeditor/ckeditor.js?_=1381313244552 404 (Not Found)
rails_admin-5daa9b7b76a226bdfa46a07fdaf2d77d.js:3

我怎样才能解决这个问题?

最佳答案

不知道,你有没有预编译你的 Assets ?

If you're switching from a different kind of host, like Heroku, you may forget that you have to manually precompile your assets. You're lucky, though – it's easy!

RAILS_ENV=production rake assets:precompile If you run into problems, try running this instead:

RAILS_ENV=production rake assets:precompile:primary



来自 https://www.digitalocean.com/community/articles/how-to-launch-your-ruby-on-rails-app-with-the-digitalocean-one-click-image

关于rails_admin 找不到 ckeditor.js 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19268813/

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