Defect #32442

Upgrade vom 2.x to 4.0.5 fails when invoking "rake db:migrate RAILS_ENV=production"

Added by Sebastian Ebert about 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Affected version:4.0.5

Description

I am following the instructions here:
http://www.redmine.org/projects/redmine/wiki/redmineupgrade

bundle install --without development test

finishes with message

Bundle complete! 28 Gemfile dependencies, 59 gems now installed.
Gems in the groups development and test were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

Running

bundle exec rake generate_secret_token

crashes with

/usr/lib/ruby/2.5.0/rubygems/resolver.rb:231:in `search_for': Unable to resolve dependency: user requested 'did_you_mean (= 1.2.0)' (Gem::UnsatisfiableDependencyError)

Running

rake generate_secret_token

(without bundle exec)

however works and produces the file /config/initializers/secret_token.rb

Running

bundle exec rake db:migrate RAILS_ENV=production 

crashes with:

        20: from /usr/local/bin/rake:23:in `<main>'
        19: from /usr/lib/ruby/2.5.0/rubygems.rb:309:in `activate_bin_path'
        18: from /usr/lib/ruby/2.5.0/rubygems.rb:309:in `synchronize'
        17: from /usr/lib/ruby/2.5.0/rubygems.rb:311:in `block in activate_bin_path'
        16: from /usr/lib/ruby/2.5.0/rubygems.rb:243:in `finish_resolve'
        15: from /usr/lib/ruby/2.5.0/rubygems/request_set.rb:397:in `resolve_current'
        14: from /usr/lib/ruby/2.5.0/rubygems/request_set.rb:385:in `resolve'
        13: from /usr/lib/ruby/2.5.0/rubygems/resolver.rb:188:in `resolve'
        12: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:42:in `resolve'
        11: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:64:in `resolve'
        10: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:106:in `start_resolution'
         9: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:165:in `initial_state'
         8: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:51:in `sort_dependencies'
         7: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:69:in `with_no_such_dependency_error_handling'
         6: from /usr/lib/ruby/2.5.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:52:in `block in sort_dependencies'
         5: from /usr/lib/ruby/2.5.0/rubygems/resolver.rb:277:in `sort_dependencies'
         4: from /usr/lib/ruby/2.5.0/rubygems/resolver.rb:277:in `with_index'
         3: from /usr/lib/ruby/2.5.0/rubygems/resolver.rb:277:in `sort_by'
         2: from /usr/lib/ruby/2.5.0/rubygems/resolver.rb:277:in `each'
         1: from /usr/lib/ruby/2.5.0/rubygems/resolver.rb:283:in `block in sort_dependencies'
/usr/lib/ruby/2.5.0/rubygems/resolver.rb:231:in `search_for': Unable to resolve dependency: user requested 'did_you_mean (= 1.2.0)' (Gem::UnsatisfiableDependencyError)

Running

rake db:migrate RAILS_ENV=production

(without bundle exec)

Results in

rake aborted!
NameError: undefined local variable or method `config' for main:Object
/usr/share/redmine/plugins/open_id_authentication/init.rb:7:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/usr/share/redmine/lib/redmine/plugin.rb:175:in `block in load'
/usr/share/redmine/lib/redmine/plugin.rb:166:in `each'
/usr/share/redmine/lib/redmine/plugin.rb:166:in `load'
/usr/share/redmine/config/initializers/30-redmine.rb:21:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:657:in `block in load_config_initializer'
/var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:170:in `instrument'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:656:in `load_config_initializer'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:613:in `each'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:613:in `block in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `each'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `tsort_each_child'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/application.rb:337:in `require'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/application.rb:337:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-5.2.3/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/rake-13.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => db:load_config => environment

I have
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
installed.

As a consequence, I am not able to finish the upgrade procedure.

Also available in: Atom PDF