Project

General

Profile

Redmine installation fails with LoadError: cannot load such file -- open_id_authentication

Added by Andreas Deininger about 1 year ago

Hi,

I'm trying to install redmine 5.0.4 on my Ubunto 22.04 box.

I added a database and can successfully log into the database via command line client.

While trying to initialise the database, I'm now getting:

redmine@myserver:~$ RAILS_ENV=production bundle exec rake db:migrate
rake aborted!
LoadError: cannot load such file -- open_id_authentication
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
/opt/redmine/lib/plugins/open_id_authentication/init.rb:3:in `block in <top (required)>'
/opt/redmine/config/initializers/00-core_plugins.rb:10:in `eval'
/opt/redmine/config/initializers/00-core_plugins.rb:10:in `block in <top (required)>'
/opt/redmine/config/initializers/00-core_plugins.rb:4:in `each'
/opt/redmine/config/initializers/00-core_plugins.rb:4:in `<top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:326:in `load'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:326:in `block in load'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:326:in `load'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:681:in `block in load_config_initializer'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/notifications.rb:205:in `instrument'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:680:in `load_config_initializer'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:634:in `block (2 levels) in <class:Engine>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:633:in `each'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:633:in `block in <class:Engine>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `instance_exec'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `run'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:50:in `each'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:50:in `tsort_each_child'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:60:in `run_initializers'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/application.rb:391:in `initialize!'
/opt/redmine/config/environment.rb:16:in `<top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/application.rb:367:in `require_environment!'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/redmine/bin/bundle:4:in `load'
/opt/redmine/bin/bundle:4:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)

The error is the same when trying to load defaults into the database.

Any idea what's wro here? Any help is appreciated.


Replies (2)

RE: Redmine installation fails with LoadError: cannot load such file -- open_id_authentication - Added by Holger Just about 1 year ago

OpenID support was removed from Redmine in 5.0.0 (#35755). This includes the lib/plugins/open_id_authentication directory which was entirely removed in that version.

It appears you have copied some directories from your previous Redmine version to your current installation which you should not have. Specifically, the entire contents of the lib/plugins directory is part of Redmine and must not be changed or copied from previous versions. Custom plugins can be added to the plugins directory on the top-level instead.

To fix this, please make sure that core Redmine files (including the entire contents of the app, lib, public directories, as well as most files in the config directory with the exception of the adapted configuration.yml file) are entirely those of your current Redmine version and were not copied from other versions..

RE: Redmine installation fails with LoadError: cannot load such file -- open_id_authentication - Added by Andreas Deininger about 1 year ago

You are right, there were indeed remnants in the install directory that broke my build. I removed the whole project directory and started from scratch again. Now redmine is up and running :-). Thanks for your help!

    (1-2/2)