Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test against subdirectory environment #32

hanachin opened this issue Feb 6, 2020 · 0 comments

Test against subdirectory environment #32

hanachin opened this issue Feb 6, 2020 · 0 comments


Copy link

@hanachin hanachin commented Feb 6, 2020

Redmine may run in a subdirectory environment.

I sometimes write bugs that only occur in a subdirectory environment.
For example, sending a request to / using JavaScript.

So I want to run my feature spec(or system test) against subdirectory environment.


  • Add apply-patch-subdirectory command to apply the following patch.
diff --git a/ b/
index 5bc2a619e..e30b85ece 100644
--- a/
+++ b/
@@ -1,4 +1,7 @@
 # This file is used by Rack-based servers to start the application.
 require ::File.expand_path('../config/environment',  __FILE__)
-run Rails.application
+map '/redmine' do
+  run Rails.application
diff --git a/config/initializers/relative_url_root.rb b/config/initializers/relative_url_root.rb
new file mode 100644
index 000000000..6438db43e
--- /dev/null
+++ b/config/initializers/relative_url_root.rb
@@ -0,0 +1 @@
+Redmine::Utils::relative_url_root = "/redmine"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.