我们刚刚安装了Redmine Charts(http://github.com/mszczytowski/redmine_charts/tree/master)和相关的OpenFlashChart插件,但是当我们启动Ruby服务器时,我们得到以下错误。我们的步骤是:
尝试启动服务器
=>启动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'
来自/usr/local/apps/redmine-0.8/vendor/plugins/mszczytowski-redmine_charts-e3c5010466d7585d987bc1018e94daee90906a5d/lib/redmine_charts/line_data_converter.rb:4
来自/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'
来自/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'
来自/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级......
来自/usr/lib64/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/server.rb:39
来自/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'
来自脚本/服务器:3
答案 0 :(得分:1)
查看redmine_charts的来源,它需要Redmine :: I18n - 有几个“包含Redmine :: I18n”的实例。
有关Rails,Redmine和I18n的更多信息,另请参阅http://www.redmine.org/news/22。
您可能会遇到版本控制(Rails和Redmine)问题。
答案 1 :(得分:1)
Redmine的I18n
是多种语言的最新成员。它仅在Redmine的主干版本中可用,0.8.x版本的Redmine使用较旧的GLoc
插件。
您有几种方法可以解决此问题:
I18n
错误要修复错误,您需要浏览代码并将I18n
的所有提及替换为GLoc
,然后在插件lang/
目录中创建旧版本的翻译
Eric Davis