Redmine - 导致错误的项目版本:

时间:2015-10-14 16:18:38

标签: ruby-on-rails ruby

我已经在Ubuntu盒子上安装了Redmine的新副本,用于插件开发项目。一旦我得到基本的Redmine安装并运行并运行迁移,一切似乎都运行正常。但是,每当我到达需要使用Version类的页面时,都会抛出错误。

好像它可能尝试使用不同的Version类 - 也许是指定redmine版本的类?

更新:似乎Redmine中对Version的任何引用都调用了一个名为Version的常量而不是类Version

例如,创建项目有效。但是,当我尝试查看项目时,我得到了这个:

Completed 500 Internal Server Error in 167ms (ActiveRecord: 7.4ms)

ActionView::Template::Error (undefined method `joins' for "3.1.7.3":String):
    42:     <% end %>
    43:
    44:     <h1><%= page_header_title %></h1>
    45:
    46:     <% if display_main_menu?(@project) %>
    47:     <div id="main-menu">
    48:         <%= render_main_menu(@project) %>
  app/models/project.rb:455:in `shared_versions'
  lib/redmine.rb:228:in `block (2 levels) in <top (required)>'
  lib/redmine/menu_manager.rb:446:in `call'
  lib/redmine/menu_manager.rb:446:in `allowed?'
  lib/redmine/menu_manager.rb:164:in `block in menu_items_for'
  lib/redmine/menu_manager.rb:163:in `each'
  lib/redmine/menu_manager.rb:163:in `menu_items_for'
  lib/redmine/menu_manager.rb:90:in `render_menu'
  lib/redmine/menu_manager.rb:80:in `render_main_menu'
  app/views/layouts/base.html.erb:45:in `_app_views_layouts_base_html_erb___3256852209764588002_58036380'
  app/controllers/projects_controller.rb:153:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'


  Rendered /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (28.8ms)
  Rendered /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.3ms)
  Rendered /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
  Rendered /usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (44.9ms)

1 个答案:

答案 0 :(得分:0)

我曾经使用过Puphpet安装(它提供了RVM(这似乎是问题。我通过做一个非常备用的Vagrant盒子设置并随后手动安装RVM来修复它。

为了记录,它所寻找的Version常量是Ruby核心库的一部分,特别是在rexml