1

我正在尝试在我的 rails 3.2.8 应用程序中使用带有 active-admin 的 tiny-mce WYSIWYG 编辑器。包括后:

gem 'tinymce-rails'

(https://github.com/sophlenz/tinymce-rails)

在我的 Gemfile 中,尝试启动“webbrick”或“thin”服务器甚至是 rails 控制台时出现以下错误:

    /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce/rails/configuration.rb:88:in `<module:Rails>': uninitialized constant ActiveSupport::HashWithIndifferentAccess (NameError)
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce/rails/configuration.rb:1:in `<top (required)>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce/rails.rb:5:in `require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce/rails.rb:5:in `<module:Rails>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce/rails.rb:2:in `<module:TinyMCE>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce/rails.rb:1:in `<top (required)>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce-rails.rb:1:in `require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/tinymce-rails-3.5.7/lib/tinymce-rails.rb:1:in `<top (required)>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `block in require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
from /home/pablo/Programming/railsy/tiny_mce_trial/config/application.rb:8:in `<top (required)>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /home/pablo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

我设法在一个新的 Rails 应用程序上重现了这个错误,所以我不认为这是一个依赖问题。ruby 1.9.3 和 ruby​​ 1.9.2 都会发生这种情况。

我试图添加:

require 'tinymce-rails'

在 application.rb、envirment.rb 和初始化文件中,但它并没有解决问题。

有什么线索吗?

4

1 回答 1

0

已经明白了。

看起来最新的 3.5.7 版本中存在错误。昨天才出来的。

安装以前的版本:

gem install tinymce-rails -v 3.5.6

gem 'tinymce-rails', '3.5.6'

修复。

于 2012-10-10T14:19:17.493 回答