ruby Redmine插件:未初始化常数I18n

rqdpfwrv  于 2023-08-04  发布在  Ruby
关注(0)|答案(2)|浏览(114)

我们刚刚安装了Redmine Charts和相关的OpenFlashChart插件,但是当我们启动Ruby服务器时,我们得到了下面的错误。我们的步骤是:
1.下载图表的tar文件
1.解压缩到$REDMINE_ROOT/plugins dir

  1. $REDMINE_ROOT/script/plugin install http://svn.pullmonkey.com/plugins/trunk/open_flash_chart/
    1.尝试启动服务器
=> Booting WEBrick...
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:276:in `load_missing_constant': uninitialized constant Redmine::I18n (NameError)
    from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:468:in `const_missing'
    from /usr/local/apps/redmine-0.8/vendor/plugins/mszczytowski-redmine_charts-e3c5010466d7585d987bc1018e94daee90906a5d/lib/redmine_charts/line_data_converter.rb:4
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
    from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
    from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
    from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:102:in `require_or_load'
     ... 27 levels...
    from /usr/lib64/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/server.rb:39
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/server:3

字符串

iqjalb3h

iqjalb3h1#

Redmine的I18n是最近为多种语言添加的。它只在Redmine的 Backbone.js 版本中可用,Redmine的0.8.x版本使用旧的GLoc插件。
你有几个选项来解决这个问题:

  • 升级到Redmine的 Backbone.js 版本
  • 要求开发人员使插件与Redmine的发布版本兼容(我个人为我的Redmine插件做了这件事)
  • 或者尝试自己修复I18n错误

要修复这些错误,您需要检查代码并将所有提到的I18n替换为GLoc,然后在插件lang/目录中创建旧版本的翻译。
埃里克·戴维斯

hwamh0ep

hwamh0ep2#

查看redmine_charts的源代码,它需要Redmine::I18 n-有几个“include Redmine::I18 n”的示例。
有关Rails、Redmine和I18 n的更多信息,请参见http://www.redmine.org/news/22
您可能遇到了版本控制(Rails和Redmine)问题。

相关问题