Project

General

Profile

Actions

Defect #36519

closed

r21283 - cannot load any plugin

Added by Martin K almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi,
I updated to latest trunk r21387, but I was getting an error, so I went down to r21282, which was working fine, then to r21283 (Extract Redmine::PluginLoader from Redmine::Plugin) and my error starts from here, it is:

$bundle exec rails server -u webrick -e production
=> Booting WEBrick
=> Rails 6.1.4.1 application starting in production http://0.0.0.0:3000
=> Run `bin/rails server --help` for more startup options
Exiting
Traceback (most recent call last):
        66: from bin/rails:4:in `<main>'
        65: from bin/rails:4:in `require'
        64: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<top (required)>'
        63: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
        62: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
        61: from /usr/lib/ruby/gems/2.5.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        60: from /usr/lib/ruby/gems/2.5.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        59: from /usr/lib/ruby/gems/2.5.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        58: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `perform'
        57: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `tap'
        56: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:144:in `block in perform'
        55: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:39:in `start'
        54: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:311:in `start'
        53: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:379:in `handle_profiling'
        52: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:312:in `block in start'
        51: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
        50: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
        49: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
        48: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
        47: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
        46: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
        45: from /usr/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
        44: from config.ru:3:in `block in <main>'
        43: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
        42: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
        41: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
        40: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
        39: from /data/www/redmine_sandbox_2022_01_25/config/environment.rb:17:in `<top (required)>'
        38: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
        37: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in `run_initializers'
        36: from /usr/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
        35: from /usr/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
        34: from /usr/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
        33: from /usr/lib/ruby/2.5.0/tsort.rb:347:in `call'
        32: from /usr/lib/ruby/2.5.0/tsort.rb:347:in `each'
        31: from /usr/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
        30: from /usr/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
        29: from /usr/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        28: from /usr/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
        27: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
        26: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
        25: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
        24: from /usr/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
        23: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/reloader.rb:88:in `prepare!'
        22: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:105:in `run_callbacks'
        21: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:512:in `invoke_before'
        20: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:512:in `each'
        19: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:512:in `block in invoke_before'
        18: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:199:in `block in halting'
        17: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:603:in `block in default_terminator'
        16: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:603:in `catch'
        15: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
        14: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
        13: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:427:in `block in make_lambda'
        12: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:427:in `instance_exec'
        11: from /data/www/redmine_sandbox_2022_01_25/lib/redmine/plugin_loader.rb:105:in `block in load'
        10: from /data/www/redmine_sandbox_2022_01_25/lib/redmine/plugin_loader.rb:105:in `each'
         9: from /data/www/redmine_sandbox_2022_01_25/lib/redmine/plugin_loader.rb:31:in `run_initializer'
         8: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `load'
         7: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
         6: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `block in load'
         5: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `load'
         4: from /data/www/redmine_sandbox_2022_01_25/plugins/projects_table/init.rb:10:in `<top (required)>'
         3: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
         2: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
         1: from /usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
/usr/lib/ruby/gems/2.5.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require': cannot load such file -- projects_table (LoadError)

This is my env in r21282

$ruby bin/about

sh: hg: command not found
sh: cvs: command not found
sh: bzr: command not found
Environment:
  Redmine version                4.2.3.devel.21282
  Ruby version                   2.5.9-p229 (2021-04-05) [x86_64-linux]
  Rails version                  6.1.4.1
  Environment                    production
  Database adapter               PostgreSQL
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.9.7
  Git                            2.14.3
  Filesystem
Redmine plugins:
  periodictask                   4.1.0
  projects_table                 0.0.4
  redmine_dashboard              2.11.0
  redmine_editauthor             0.11.0
  redmine_impersonate            0.10.0
  redmine_timelog_timer          2.0.1
  sidebar_hide                   0.0.8

init.rb of that plugin is:

Redmine::Plugin.register :projects_table do
  name 'Projects Table plugin'
  author 'Denis Peplin'
  description 'This plugin adds table view to Projects page'
  version '0.0.4'
  url 'https://github.com/denispeplin/redmine-projects-table'
  author_url 'https://github.com/denispeplin'
end

require 'projects_table'
ProjectsHelper.send(:include, ProjectsTable)

Thanks for any help

Actions #1

Updated by Go MAEDA almost 3 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Some existing plugins are not compatible with the latest devel version of Redmine due to Rails Zeitwerk support introduced in #29914. Such plugins should be fixed.

Actions #2

Updated by Martin K almost 3 years ago

Can you point me to some info about what should be fixed?
Is it just adding File.dirname(FILE) + '/lib' to require or something more?

Thanks.

Actions #3

Updated by Go MAEDA almost 3 years ago

Martin K wrote:

Can you point me to some info about what should be fixed?

The following pages may be helpful.

Actions

Also available in: Atom PDF