NoMethodError:未定义的方法`application' for Ckeditor :: Rails:Module

时间:2014-09-29 16:10:33

标签: ruby-on-rails

在编译我的rails应用程序的资产以便在Heroku上获取它时,我很挣扎。后       rake assets:预编译RAILS_ENV = production --trace 我期待这个问题

 NoMethodError: undefined method `application' for Ckeditor::Rails:Module

我不知道要解决。跟踪的顶部是返回:

              (in /Users/javier/.rvm/gems/ruby-2.1.2/gems/ckeditor-4.1.0/app/assets/javascripts/ckeditor/init.js.erb)
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/ckeditor-4.1.0/lib/ckeditor.rb:97:in `base_path'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/ckeditor-4.1.0/app/assets/javascripts/ckeditor/init.js.erb:6:in `block in singleton class'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/ckeditor-4.1.0/app/assets/javascripts/ckeditor/init.js.erb:-5:in `instance_eval'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/ckeditor-4.1.0/app/assets/javascripts/ckeditor/init.js.erb:-5:in `singleton class'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/ckeditor-4.1.0/app/assets/javascripts/ckeditor/init.js.erb:-7:in `__tilt_2156289000'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate'
            /Users/javier/.rvm/gems/ruby-2.1.2/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'

我试图查找.init.js.erb文件,但我没有在我的资产中找到它。我还从我的 assets / javascript / application.js 中删除了// = require ckeditor / init,看起来像这样

            //= require jquery
            //= require jquery_ujs
            //= require ckeditor-jquery
            //= require turbolinks
            //= require the_comments
            //= require rich/base

在开发中似乎工作正常,任何想法我能尝试什么?

1 个答案:

答案 0 :(得分:0)

尝试使用主版本

添加ckeditor_rails gem
gem 'ckeditor_rails', github: 'tsechingho/ckeditor-rails'