【发布时间】:2018-03-23 05:31:46
【问题描述】:
由于应用了插件,我尝试将 Ruby 版本从 2.5.0 更改为 2.4.1,并将 Rails 版本从 5.1.2 更改为 4.2.1。
环境:
Redmine 版本 - 3.4.4.devel
Ruby 版本 - 2.4.1-p111 (2017-03-22) [x86_64-darwin16]
Rails 版本 - 4.2.8环境 - 生产
数据库适配器 - Mysql2
我是 Ruby on Rails 的新手。我应该在这里做什么?
ActionView::Template::Error (undefined method `public_compute_asset_path' for #<#<Class:0x007f86344e0180>:0x007f86344d0f78>):
config/initializers/10-patches.rb:221:in `rails_asset_id'
NoMethodError (undefined method `saved_change_to_parent_id?' for #<Project:0x00007fe5c80586f0>):
app/models/project.rb:83:in `block in <class:Project>'
app/controllers/projects_controller.rb:187:in `update'
NoMethodError (undefined method `saved_change_to_sharing?' for
#<Version:0x00007fe5c88d8870> Did you mean? saved_attachments):
app/models/version.rb:371:in `update_issues_from_sharing_change'
app/controllers/versions_controller.rb:125:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
【问题讨论】:
-
undefined method ``public_compute_asset_path'你更新了你的routes。这似乎是一个路由错误或配置错误。也许这是一个已知问题redmine.org/boards/2/topics/48375 -
我在 Rails API 上搜索了
public_compute_asset_path,并将path = File.join(Rails.public_path, **public_compute_asset_path**("#{source}#{extname}", options))更改为path = File.join(Rails.public_path, **asset_path**("#{source}#{extname}", options))。现在它看起来可以工作了,但我不断收到NoMethodError (undefined method saved_change_to_sharing?' for #<Version:0x00007fe5c88d8870>和NoMethodError (undefined method saved_change_to_parent_id? for #<Project:0x00007fe5c80586f0>):等.... -
Redmine 3.4.4 与 Rails 5 不兼容。插件通常与特定版本的 Redmine 兼容,而不是与 Rails 版本兼容。
标签: ruby-on-rails redmine webrick