Project

General

Profile

Actions

Patch #12790

closed

ActionController::RoutingError. No route matches for any installed plugins in Redmine 2.1.5.stable

Added by Hong-Jie Dai over 11 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

My environment:

Environment:
  Redmine version                          2.1.5.stable
  Ruby version                             1.9.3 (i386-mingw32)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         Mysql2

After installing it on a PUMA server in Windows Server 2008 R2, I found that all third-party plugins requiring the routing mapping are failed with the following error messages in the log file:

ActionController::RoutingError (No route matches {:controller=>"issue_templates_settings", :action=>"preview", :project_id=>#<Project id: ...>}):
....

I read some documents and finally found out the solution as the patch file: routes.rb.patch for Redmine/config/routes.rb

# source code of routes.rb
333     Dir.glob File.expand_path("plugins", Rails.root) do |plugin_dir|
334         file = File.join(plugin_dir, "config/routes.rb")

I checked the file variable on line 334, and observed its value referring to my local folder: "C:/Redmine/plugins/./config/routes.rb"
Therefore, I modified it to refer to the correct directory.

333     Dir.glob File.expand_path("plugins", Rails.root)+"/*" do |plugin_dir|

Then every thing is fine!

I am not sure whether the problem only appears in my configuration or not.

I am a newbie in Redmine and not familiar with the Ruby programming language or Ruby on Rails.
I am not sure the formal syntax to deal with the problem, but this patch do resolve the error reported in Page not found error after adding Hudson plugin.


Files

routes.rb.patch (456 Bytes) routes.rb.patch Hong-Jie Dai, 2013-01-09 17:09

Related issues

Related to Redmine - Defect #12590: Plugin routes.rb files are not getting included on WindowsClosedJean-Baptiste Barth

Actions
Actions #1

Updated by Toshi MARUYAMA over 11 years ago

Is this patch for #12590?

Actions #2

Updated by Go MAEDA over 7 years ago

  • Status changed from New to Closed

The problem was caused by Ruby's bug (mentioned in #12590#note-3) and the bug has already been fixed.

[Bug #7374] File.expand_path resolving to first file/dir instead of absolute path
https://bugs.ruby-lang.org/issues/7374

Actions

Also available in: Atom PDF