由於最近的Rails安全問題,我升級了一些我使用的gem。在升級到Rails 3.2.12和json 1.7.7之後,Heroku上的Redactor-rails gem問題
我看到一個錯誤後,我把我的應用程序的Heroku(推經過細,但此應用從未停止崩潰):
2013-02-12T00:12:49+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/lib/redactor-rails.rb:30:in `document_model': uninitialized constant RedactorRails::Document (NameError)
2013-02-12T00:12:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/app/controller/redactor_rails/documents_controller.rb:2:in `<class:DocumentsController>'
2013-02-12T00:12:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/app/controller/redactor_rails/documents_controller.rb:1:in `<top (required)>'
2013-02-12T00:12:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-02-12T00:12:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
我沒有看到這個問題,當我運行應用程序本地。在本地,我使用Ruby 1.9.3-p194,但看起來Heroku在Ruby 1.9.1上。
有關如何解決此問題的任何想法?
感謝, 林戈
謝謝你讓我知道!不幸的是,即使這樣也沒有幫助。我不知道爲什麼我似乎是唯一面臨這個問題的人。 – 2013-02-12 19:28:04
你可以分享一些'app/controller/redactor_rails/documents_controller.rb'嗎?至少頂部 – catsby 2013-02-12 22:04:04
是絕對的。這裏是一個鏈接到該文件:https://github.com/SammyLin/redactor-rails/blob/master/app/controller/redactor_rails/documents_controller.rb – 2013-02-12 22:59:14