我在Rails 3.2.11/Ruby 1.9.3上使用了ckeditor
(https://github.com/galetahub/ckeditor)gem。Rails ckeditor gem js在Heroku生产上预编译时出错
我已经得到这个JS错误我在生产环境中做rake assets:precompile
后(部署到Heroku上)
Uncaught TypeError: Object #<Object> has no method 'apply'
我不知道这是否是相关的,但我已经跟踪误差(使用Chrome的Webdev的工具)是开始一个块:
CKEDITOR.plugins.add("basicstyles", ...)
我以为是负责添加粗体,斜体,下划线的插件,以及其他类似的字体样式按钮工具栏。
textarea仍显示没有CKEditor UI。
我使用的是rubygems的最新版本(4.0.4)。
我有这个在我的application.js
:
//= require 'ckeditor/init'
//= require 'ckeditor/config'
我在app/assets/ckeditor/config.js
自定义配置文件,并在app/assets/ckeditor/plugins/
两个自定义插件。
我也在本地使用RAILS_ENV=production
进行了测试,并且也无法正常工作。
你的Gemfile中有require语句吗? – AlexBrand 2013-04-22 11:36:37
对不起,回合。感谢您指出。是的,它应该说,“application.js” – 2013-04-22 15:45:12