Defect #11058

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

Added by Dirk Brammertz about 9 years ago. Updated almost 9 years ago.

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

0%

Category:-
Target version:-
Resolution: Affected version:2.0.0

Description

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, #<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

History

#1 Updated by Toshi MARUYAMA about 9 years ago

  • Category deleted (Issues)

#2 Updated by Jonathan Tee almost 9 years ago

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

Also available in: Atom PDF