プロジェクト

全般

プロフィール

Vote #71949

未完了

Run Redmine in a sub directory results in "No route matches"

Admin Redmine さんがほぼ4年前に追加.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
-
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
0
version_id:
0
issue_org_id:
11058
author_id:
56657
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
43
ステータス-->[New]

説明

Starting from Redmine 2.0 the web context does not recogonize a sub directory. See also Thread http://www.redmine.org/boards/2/topics/30676?r=30981#message-30981.

The problem seems to be that the ActionController within rails 3. It does no longer consider the variable
ActionController::AbstractRequest.relative_url_root as web context root for the routes.

I managed to get around that problem by modifying the config/routes.rb:

--- redmine-2.0.0/config/routes.rb    (revision 9726)
+++ redmine-2.0.0/config/routes.rb    (working copy)
@@ -16,6 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

 RedmineApp::Application.routes.draw do
+scope "/redmine" do
   root :to => 'welcome#index', :as => 'home'

   match 'login', :to => 'account#login', :as => 'signin'
@@ -332,3 +333,4 @@
     end
   end
 end
+end

My versions:

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.4.2
Rack version              1.4
Rails version             3.2.3
Active Record version     3.2.3
Action Pack version       3.2.3
Active Resource version   3.2.3
Action Mailer version     3.2.3
Active Support version    3.2.3
Middleware                Rack::Cache, ActionDispatch::Static, Rack::Lock, #, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport, OpenIdAuthentication
Application root          /srv/redmine-2.0.1
Environment               production
Database adapter          mysql
Database schema version   20120422150750

journals

--------------------------------------------------------------------------------
Is http://www.redmine.org/issues/11881#note-14 working for you (without scopes)?
--------------------------------------------------------------------------------


related_issues

relates,New,11274,Repository edit link is incorrect when running in a sub-URI
relates,New,11147,relative_url_root changes only css... , but not dynamic pages
duplicates,Closed,11059,Redmine 2.0.1 does not run with a sub-URI

表示するデータがありません

他の形式にエクスポート: Atom PDF

いいね!0