Defect #33310

Warnings while running redmine:load_default_data rake task

Added by Go MAEDA 4 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Administration
Target version:4.0.8
Resolution:Fixed Affected version:3.0.0

Description

You will see two warnings when you run redmine:load_default_data rake task.

$ bin/rake redmine:load_default_data
/path/to/gems/ruby/2.6.0/gems/activerecord-5.2.4.2/lib/active_record/associations.rb:1828: warning: already initialized constant CustomField::HABTM_Roles
/path/to/gems/ruby/2.6.0/gems/activerecord-5.2.4.2/lib/active_record/associations.rb:1828: warning: previous definition of HABTM_Roles was here

Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] 

Related issues

Related to Redmine - Defect #14607: rake redmine:load_default_data Error Closed

Associated revisions

Revision 19715
Added by Go MAEDA 4 months ago

Fix warnings while running redmine:load_default_data rake task (#33310).

Patch by Go MAEDA.

Revision 19716
Added by Go MAEDA 4 months ago

Merged r19715 from trunk to 4.1-stable (#33310).

Revision 19717
Added by Go MAEDA 4 months ago

Merged r19715 from trunk to 4.0-stable (#33310).

History

#1 Updated by Go MAEDA 4 months ago

It can be fixed with the following patch:

diff --git a/lib/tasks/load_default_data.rake b/lib/tasks/load_default_data.rake
index bcfff7c3b..cc6774bce 100644
--- a/lib/tasks/load_default_data.rake
+++ b/lib/tasks/load_default_data.rake
@@ -2,7 +2,6 @@ desc 'Load Redmine default configuration data. Language is chosen interactively

 namespace :redmine do
   task :load_default_data => :environment do
-    require 'custom_field'
     include Redmine::I18n
     set_language_if_valid('en')

#2 Updated by Go MAEDA 4 months ago

  • Related to Defect #14607: rake redmine:load_default_data Error added

#3 Updated by Go MAEDA 4 months ago

  • Target version set to 4.0.8

Setting the target version to 4.0.8.

#4 Updated by Go MAEDA 4 months ago

  • Affected version set to 3.0.0

#5 Updated by Go MAEDA 4 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix.

Also available in: Atom PDF