Defect #11058

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

Added by Dirk Brammertz over 10 years ago. Updated over 10 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:2.0.0


Starting from Redmine 2.0 the web context does not recogonize a sub directory. See also Thread

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 @@

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, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x7fdbc0838cd8>, 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

Related issues

Related to Redmine - Defect #11274: Repository edit link is incorrect when running in a sub-URI New
Related to Redmine - Defect #11147: relative_url_root changes only css... , but not dynamic p... New
Duplicated by Redmine - Defect #11059: Redmine 2.0.1 does not run with a sub-URI Closed


#1 Updated by Toshi MARUYAMA over 10 years ago

  • Category deleted (Issues)

#2 Updated by Jonathan Tee over 10 years ago

Is working for you (without scopes)?

Also available in: Atom PDF