我在 vendor/assets/javascripts/ 中有 tiny_mce 文件夹。在我的 application.js 文件中,我有:
//= require tiny_mce/tiny_mce_src.js
在开发中,Tiny mce 编辑器工作。在heroku上的生产中它没有。
TypeError: this.getDoc(...) is undefined
[Break On This Error]
... get source for: http://www.example.com/assets/application-fcf26d0749f321ac7...
applic...2815.js (line 31035)
Failed to load: http://www.example.com/entries/1//themes/advanced/editor_template.js
applic...2815.js (line 27236)
Failed to load: http://www.example.com/entries/1//langs/en.js
这是 tiny_mce 的具体代码:
tinyMCE.init({
document_base_url : "http://www.example.com/",
mode : "textareas"
});
我认为问题是由于这些双斜杠而出现的:
Failed to load: http://www.example.com/entries/1//themes/advanced/editor_template.js
Failed to load: http://www.example.com/entries/1//langs/en.js