software-project / scrum-pm

Scrum PM is a plugin for Redmine ticket management system. It adds Scrum items like backlog, dashboard and others.
www.software-project.eu/EN/scrumpm
126 stars 47 forks source link

rake db:migrate_plugins failed: Child already added #8

Closed iblazhko closed 14 years ago

iblazhko commented 14 years ago

Ubuntu server 9.10 64-bit Redmine 0.9.3

Command

    rake db:migrate_plugins RAILS_ENV=production --trace

fails with following error:

    (in /home/redmine/redmine-0.9.3)
    ** Invoke db:migrate_plugins (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    rake aborted!
    Child already added
    /home/redmine/redmine-0.9.3/lib/redmine/menu_manager.rb:53:in `add_at'
    /home/redmine/redmine-0.9.3/lib/redmine/menu_manager.rb:358:in `push'
    /home/redmine/redmine-0.9.3/vendor/plugins/redmine_sprints/init.rb:27:in `evaluate_init_rb'
    /home/redmine/redmine-0.9.3/lib/redmine/menu_manager.rb:296:in `map'
    /home/redmine/redmine-0.9.3/vendor/plugins/redmine_sprints/init.rb:26:in `evaluate_init_rb'
    /home/redmine/redmine-0.9.3/lib/redmine/plugin.rb:67:in `instance_eval'
    /home/redmine/redmine-0.9.3/lib/redmine/plugin.rb:67:in `register'
    /home/redmine/redmine-0.9.3/vendor/plugins/redmine_sprints/init.rb:13:in `evaluate_init_rb'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/rails/plugin.rb:158:in `evaluate_init_rb'
    /home/redmine/redmine-0.9.3/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/rails/plugin.rb:154:in `evaluate_init_rb'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/rails/plugin.rb:48:in `load'
    /home/redmine/redmine-0.9.3/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:38:in `load_plugins'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `each'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `load_plugins'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/initializer.rb:369:in `load_plugins'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/initializer.rb:165:in `process'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
    /home/redmine/redmine-0.9.3/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
    /home/redmine/redmine-0.9.3/config/environment.rb:20
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /home/redmine/redmine-0.9.3/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    /home/redmine/redmine-0.9.3/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    /home/redmine/redmine-0.9.3/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    /home/redmine/redmine-0.9.3/vendor/rails/railties/lib/tasks/misc.rake:4
    /usr/lib/ruby/1.8/rake.rb:617:in `call'
    /usr/lib/ruby/1.8/rake.rb:617:in `execute'
    /usr/lib/ruby/1.8/rake.rb:612:in `each'
    /usr/lib/ruby/1.8/rake.rb:612:in `execute'
    /usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:588:in `invoke_prerequisites'
    /usr/lib/ruby/1.8/rake.rb:585:in `each'
    /usr/lib/ruby/1.8/rake.rb:585:in `invoke_prerequisites'
    /usr/lib/ruby/1.8/rake.rb:577:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:564:in `invoke'
    /usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task'
    /usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:2005:in `each'
    /usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
    /usr/lib/ruby/1.8/rake.rb:1999:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:1977:in `run'
    /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
    /usr/lib/ruby/1.8/rake.rb:1974:in `run'
    /usr/bin/rake:28
software-project commented 14 years ago

You probably have previously added some other plugin that adds dashboard tab to redmine menu. You can remove that plugin or change name of tab from my plugin i /vendor/plugins/remine_sprints/init.rb:27 from :dashboard to eg. :sprint_dashboard It should do the trick.

ghost commented 14 years ago

I have this same issue. Changing line 27 did not do anything for me. No other plugins are adding a dashboard menu item. I am running Redmine 0.9.4 on CentOS 5.

ghost commented 14 years ago

My trace looks identical, also.

ghost commented 14 years ago

Any suggestions?

foobacca commented 14 years ago

I hit this error aswell, using Redmine 0.9.4 on CentOS 5.4

In /vendor/plugins/remine_sprints/init.rb I had to change lines 27 and 28 (to :scrum_dashboard and :scrum_backlog ) and then it worked.

(Well ... I'm still tracking down some other conflicts between plugins, but I'm past this particular error anyway).

ghost commented 14 years ago

Changing line 27 and 28 did not help for me.

** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Child already added
/var/www/redmine-0.9.4/lib/redmine/menu_manager.rb:53:in `add_at'
/var/www/redmine-0.9.4/lib/redmine/menu_manager.rb:365:in `push'
/var/www/redmine-0.9.4/vendor/plugins/redmine_sprints/init.rb:27:in `evaluate_init_rb'
/var/www/redmine-0.9.4/lib/redmine/menu_manager.rb:303:in `map'
/var/www/redmine-0.9.4/vendor/plugins/redmine_sprints/init.rb:26:in `evaluate_init_rb'
/var/www/redmine-0.9.4/lib/redmine/plugin.rb:67:in `instance_eval'
/var/www/redmine-0.9.4/lib/redmine/plugin.rb:67:in `register'
/var/www/redmine-0.9.4/vendor/plugins/redmine_sprints/init.rb:13:in `evaluate_init_rb'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/var/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/rails/plugin.rb:48:in `load'
/var/www/redmine-0.9.4/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:38:in `load_plugins'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `each'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `load_plugins'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:369:in `load_plugins'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:165:in `process'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/var/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/var/www/redmine-0.9.4/config/environment.rb:20
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/var/www/redmine-0.9.4/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
software-project commented 14 years ago

What plugins are you using?

ghost commented 14 years ago

aside from the standard plugins, the following is in my vendors/plugins dir:

attachment_fu gravatar open_flash_chart redmine_graphs redmine_quips redmine_whining

shahjapan commented 14 years ago

thanks foobacca,

             I was getting the same error and I renamed it, it worked ! Thanks a lot for posting....the solution.....

Here are my changes ---- vim /home/redmine-0.9/vendor/plugins/scrum-pm/init.rb Line: 27

New: menu.push :sprints_dashboard, { :controller => 'sprints', :action => 'show', :id => :show }, :caption => :label_dashboard, :after => :activity, :param => :project_id

OLD: menu.push :dashboard, { :controller => 'sprints', :action => 'show', :id => :show }, :caption => :labeldashboard, :after => :activity, :param => :project