Project

General

Profile

db:migrate:upgrade_plugin_migrations fails on upgrade from 0.8.0 to 1.2.1

Added by Colin Sheaff about 13 years ago

Having an issue similar to this forum post (http://www.redmine.org/boards/2/topics/2782?r=2783).

Successfully completed steps 1-3 of upgrade. However, step 4 fails with the following error:

$ sudo rake --trace db:migrate:upgrade_plugin_migrations RAILS_ENV=production
(in /var/www/html/redmine-1.2.1)
** Invoke db:migrate:upgrade_plugin_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant Rails::Plugin::Dependencies
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:131:in `const_missing'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `each'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
/var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:51:in `evaluate_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:48:in `load'
/var/www/html/redmine-1.2.1/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:38:in `load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:37:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:37:in `load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:369:in `load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:165:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run'
/var/www/html/redmine-1.2.1/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/tasks/misc.rake:4
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/colin/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

I grepped the dependencies.rb file and around line 131 it looks like this:

119-        else
120-          begin
121-            begin
122:              Dependencies.load_missing_constant self, const_name
123-            rescue NameError
124-              parent.send :const_missing, const_name
125-            end
126-          rescue NameError => e
127-            # Make sure that the name we are missing is the one that caused the error
128:            parent_qualified_name = Dependencies.qualified_name_for parent, const_name
129-            raise unless e.missing_name? parent_qualified_name
130:            qualified_name = Dependencies.qualified_name_for self, const_name
131-            raise NameError.new("uninitialized constant #{qualified_name}").copy_blame!(e)
132-          end
133-        end

My environment seems appropriately configured at this point:

$ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]
$ gem list --local

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
arrayfields (4.7.0)
fastthread (1.0.1)
fattr (1.0.3)
git-rails (0.2.1)
hoe (1.8.3)
i18n (0.4.2)
main (2.8.3)
passenger (2.0.6)
rack (1.1.1)
rails (2.3.11)
rake (0.8.7)
rubyforge (1.0.2)
rubygems-update (1.5.0)
tzinfo (0.3.12)

script/about fails, too.

$ RAILS_ENV=production script/about
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:131:in `const_missing': uninitialized constant Rails::Plugin::Dependencies (NameError)
    from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
    from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `each'
    from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:47:in `reloadable!'
    from /var/www/html/redmine-1.2.1/vendor/plugins/redmine_google_calendar/init.rb:51:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:158:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:154:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:48:in `load'
     ... 11 levels...
    from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/commands/about.rb:1
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/about:4

Any help would be appreciated.