Public bug reported:

I'm migrating a Redmine installation from Ubuntu 14.04 with a custom
Redmine setup (directly from svn repository) to Ubuntu 16.04 trying to
use the pre-packaged redmine. The sparse documentation of the
Debian/Ubuntu multi tenancy/instance feature has given me some headache
on the journey but inspecting the source to decipher what should go
where while learning a little ruby I've succeeded getting the web
application running.

However something basic in the initialization of the rails environment fails 
when trying to use "rails runner" for calling into the application from the 
command line.
My specific use is calling Repository.fetch_changesets() for updating 
references between code and tickets (as pr. 
http://www.redmine.org/projects/redmine/wiki/RedmineSettings#Fetch-commits-automatically).
 But independent of the Ruby code that is going to be executed the loading of 
the file lib/redmine/multi_tenancy.rb from config/multitenancy_environment.rb 
fails. Here's the full output;

# /usr/share/redmine/bin/rails runner --environment=production 
Repository.fetch_changesets
/usr/share/redmine/config/application.rb:79:in `instance_eval': cannot load 
such file -- redmine/multi_tenancy (LoadError)
        from /var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in 
`require'
        from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:274:in 
`block in require'
        from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:240:in 
`load_dependency'
        from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:274:in 
`require'
        from (eval):19:in `<class:Application>'
        from /usr/share/redmine/config/application.rb:79:in `instance_eval'
        from /usr/share/redmine/config/application.rb:79:in 
`<class:Application>'
        from /usr/share/redmine/config/application.rb:8:in `<module:RedmineApp>'
        from /usr/share/redmine/config/application.rb:7:in `<top (required)>'
        from /usr/lib/ruby/vendor_ruby/rails/commands/runner.rb:51:in `require'
        from /usr/lib/ruby/vendor_ruby/rails/commands/runner.rb:51:in `<top 
(required)>'
        from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:123:in 
`require'
        from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:123:in 
`require_command!'
        from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:90:in 
`runner'
        from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:39:in 
`run_command!'
        from /usr/lib/ruby/vendor_ruby/rails/commands.rb:17:in `<top 
(required)>'
        from /usr/share/redmine/bin/rails:4:in `require'
        from /usr/share/redmine/bin/rails:4:in `<main>'

I'm not well versed in Ruby nor Rails but it seems like there is
something in the multi tenancy setup that has not being setup correctly
for "rails runner" to be able to function correctly.


# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

# apt-cache policy redmine
redmine:
  Installed: 3.2.1-2
  Candidate: 3.2.1-2
  Version table:
 *** 3.2.1-2 500
        500 http://dk.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://dk.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

** Affects: redmine (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1699865

Title:
  Error on multi_tenancy require when using 'rails runner'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/redmine/+bug/1699865/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to