繁体   English   中英

在我的application.js文件中出现错误“无法找到文件'ckeditor / override'”

[英]Trouble on error “couldn't find file 'ckeditor/override'” in my application.js file

我在Ruby on Rails 4应用程序中使用galetahub / ckeditor gem(版本4.0.6)。 我按照自述文件中的指南进行操作,但是当我在application.js文件中添加//= require ckeditor/override清单语句时,我收到以下错误:

Sprockets::FileNotFound - couldn't find file 'ckeditor/override'

我的application.js文件是:

//= require jquery
//= require jquery.turbolinks
//= require jquery_ujs
//= require jquery.ui.all
//= require turbolinks
//
//= require ckeditor/override
//= require ckeditor/init

我该如何解决这个问题?

注意 :由于我不需要使用上传功能,因此我跳过“ 如何为商店上传文件生成模型 ”中的说明。


我的Gemfile是:

gem 'rails', '4.0.1.rc1'
...
gem 'turbolinks'
gem 'jquery-turbolinks', :git => 'https://github.com/kossnocorp/jquery.turbolinks.git'
gem 'ckeditor'
...

请将您的宝石'ckeditor'更新到最新的宝石。

运行bundle show来检查gem版本。

在Gemfile中添加以下内容:

gem "ckeditor", :git => "git@github.com:galetahub/ckeditor.git"

然后运行bundle update

这个对我有用。

我在这里遇到了同样的问题,我的gem ckeditor版本是4.0.6。

使用命令

bundle open ckeditor

发现app / assets / javascript / ckeditor下没有override.js.erb文件,发布gem时可能是个错误? 我不知道。 我正在使用inruby建议的方式,它有效。

gem "ckeditor", :git => "https://github.com/galetahub/ckeditor.git"

我认为您不需要override因为实际文件是app/assets/javascripts/ckeditor/override.js.erb

如果你不包含它会怎么样?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM