似乎无法弄清楚为什么 ckeditor 不再适用于heroku。它在我的本地机器上运行良好。
更新:当资产托管在 heroku 上时,无需asset_sync gem 即可工作 - 但不能使用它。
错误:Uncaught SyntaxError: Unexpected token < in config.js:1 ckeditor 找不到 config.js,< 是 404 未找到页面的开始标记 加载资源失败:服务器响应状态为 406(不可接受)
感谢我能得到的任何帮助。
ckeditor gem,Heroku,Rails 4,asset_sync
应用程序.js
//= require ckeditor/init
//= require ckeditor/config
gemfile - 版本 4.0.7
gem "ckeditor"
应用程序.rb
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
config.assets.precompile += Ckeditor.assets
config.assets.precompile += %w(ckeditor/*)
生产.rb
config.assets.compile = true
config.action_controller.asset_host = "//#{ENV['FOG_DIRECTORY']}.s3.amazonaws.com"