I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Plugin with Ubuntu/Debian multisite installation

Added by Quirin Lohr about 7 years ago

Hi!

First: Thanks for this plugin, exactly what we were looking for.

But in order to adapt it to my configuration, I had to hack one little thing.

I am running Redmine for the management of the repositories for a whole chair of a university. We have 3 main research groups, every one of them has an own Redmine instance. Realized using the Ubuntu package’s way of multiple instances.
The location of the repositories on the server is also in different sub directories for each group, so the plugin needs different configurations for each instance.

The Ubuntu package handles the configuration, e.g. the mail.yml file, in sub directories under /etc/redmine/{instance name}.

To enable the module to use this setup, I patched the following line:

--- /tmp/redmine_scm/lib/scm_config.rb    2012-05-31 11:43:09.000000000 +0200
+++ vendor/plugins/redmine_scm/lib/scm_config.rb    2013-10-01 09:56:11.712525802 +0200
@@ -22,7 +22,7 @@
     end

     def initialize
-        file = "#{Rails.root}/config/scm.yml" 
+        file = "#{ENV['RAILS_ETC']}/scm.yml" 
         if File.file?(file)
             config = YAML::load_file(file)
             if config.is_a?(Hash) && config.has_key?(Rails.env)

I am explicitly calling this a hack because I have no idea if the ENV['RAILS_ETC’] is Redmine or Ubuntu, nor do I speak Ruby.

If there is a better solution, I am glad to hear about it!

Regards
Quirin Lohr


Terms of use | Privacy policy