Ckeditor gem issue with production mode

白昼怎懂夜的黑 提交于 2019-12-04 04:40:47

You'll need to explicitly direct Rails to precompile your CKEditor assets in production:

# config/application.rb
config.assets.precompile += Ckeditor.assets

Then, within your production environment, force a precompilation:

rake assets:precompile:all

In my case I was using Rails 4 and deploying to Heroku. I found I had to precompile the assets locally first, then commit the /public/assets/ckeditor directory and deploy. Worked after that, although I don't really fancy this solution.

I had some trouble with only the lang files not being found in Rails 5.

I had to do this to get it working ->Rails.application.config.assets.precompile += %w(ckeditor/* ckeditor/lang/*) in assets.rb.

I don't know why the first declaration doesn't just include the lang folder in the first place (it works for the adapters, plugins, and skins folders). Bug maybe?

Just upgrade the ckeditor gem to latest version(~> 4.1.0) in case if you are using Rails 4.

check more update here https://github.com/galetahub/ckeditor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!