rails生成ckeditor:install无法加载生成器

时间:2014-07-25 12:58:09

标签: ruby-on-rails-3.2 ckeditor rails-generate

我添加到Gemfile

gem 'ckeditor'

我也尝试添加

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

gem 'ckeditor', :git => 'git://github.com/galetahub/ckeditor.git', :branch =>'rails3'

捆绑安装成功完成,但是当我在项目目录中调用命令

rails g ckeditor:install --orm=active_record --backend=paperclip

我得到以下回复

  

[警告]无法加载发电机“generators / ckeditor / install_generator”。错误:未初始化的常量Ckeditor :: Rails :: Generators。   /home/boberobor/.rvm/gems/ruby-1.9.3-p392/bundler/gems/ckeditor-6d8032b87595/lib/generators/ckeditor/install_generator.rb:6:in <module:Generators>' /home/boberobor/.rvm/gems/ruby-1.9.3-p392/bundler/gems/ckeditor-6d8032b87595/lib/generators/ckeditor/install_generator.rb:5:in'   /home/boberobor/.rvm/gems/ruby-1.9.3-p392/bundler/gems/ckeditor-6d8032b87595/lib/generators/ckeditor/install_generator.rb:4:in <top (required)>' /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:300:in阻止(2级)抬头'   /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:296:in each' /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:296:in阻止查找'   /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:295:in each' /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:295:in lookup'   /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:152:in find_by_namespace' /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/generators.rb:169:in调用'   /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/generate.rb:12:in <top (required)>' /home/boberobor/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:29:in'   script / rails:6:in require' script/rails:6:in'   找不到生成器ckeditor:install。

那是什么?

1 个答案:

答案 0 :(得分:1)

我解决了。问题发生在Gemfile中。有

gem 'rails-ckeditor'

在其中。

也许,有任何冲突。我删除了这一行,执行了bundle和generator。