Patch #12790
closedActionController::RoutingError. No route matches for any installed plugins in Redmine 2.1.5.stable
0%
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 .
Files
Related issues
Updated by Go MAEDA almost 8 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