Project

General

Profile

Actions

Defect #2919

closed

migrate_from_trac fails with "Tracker(#XXX) expected, got NilClass(#YYY)"

Added by Joe J about 15 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
-
Start date:
2009-03-06
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

when trying to import any trac project wit the current version of the importer, it fails with a type mismatch:

$ svn up
Revision 2552.
$ RAILS_ENV="production" rake redmine:migrate_from_trac  --trace
(in /var/www/redmine/releases/000-redmine-svn)
** Invoke redmine:migrate_from_trac (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:migrate_from_trac

WARNING: a new project will be added to Redmine during this process.
Are you sure you want to continue ? [y/N] y

Trac directory []: /var/lib/trac/xyz    
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: 
Trac database encoding [UTF-8]: 
Target project identifier []: xyz

This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n] Y
rake aborted!
Tracker(#23739603045020) expected, got NilClass(#23739574076340)
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_proxy.rb:256:in `raise_on_type_mismatch'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:113:in `<<'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:112:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:112:in `<<'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:137:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:136:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:111:in `<<'
/var/www/redmine/releases/000-redmine-svn/lib/tasks/migrate_from_trac.rake:671:in `target_project_identifier'
/var/www/redmine/releases/000-redmine-svn/lib/tasks/migrate_from_trac.rake:744
/var/www/redmine/releases/000-redmine-svn/lib/tasks/migrate_from_trac.rake:727:in `prompt'
/var/www/redmine/releases/000-redmine-svn/lib/tasks/migrate_from_trac.rake:744
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
$
$ ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]
$ gem list rails

*** LOCAL GEMS ***

rails (2.2.2, 2.1.2, 2.1.0, 2.0.1)
$

We'd like to move to redmine, but an import of existing projects with all their facetts is absolutely necessary. Otherwise we must stay with trac :(

Thanks a lot for your great work!

Actions #1

Updated by Jean-Philippe Lang about 15 years ago

  • Status changed from New to Closed

Before processing your Trac database, you need to load the default Redmine configuration as mentioned in RedmineMigrate:

rake redmine:load_default_data RAILS_ENV="production"
Actions #2

Updated by Nikolay Artemenko almost 14 years ago

  • Status changed from Closed to Reopened

Hallo!
I have similar problem!
But your advise doesn`t help me...

Actions #3

Updated by Pavel Pivovarov about 13 years ago

Hello! I confirm, that Error is still present!

Have the same Tracker(#-612886248) expected, got NilClass(#-608353828)

This solution dosen't help!

Actions #4

Updated by Jean-Philippe Lang about 13 years ago

Please, run the task with --trace option and post the error stack trace.

Actions #5

Updated by Pavel Pivovarov about 13 years ago

[root@redmine redmine]# RAILS_ENV="production" rake redmine:migrate_from_trac --trace
(in /opt/redmine)
  • Invoke redmine:migrate_from_trac (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:migrate_from_trac

WARNING: a new project will be added to Redmine during this process.
Are you sure you want to continue ? [y/N] y

Trac directory []: /opt/trac
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: postgresql
Trac database host [localhost]:
Trac database port [5432]:
Trac database name []: trac
Trac database schema [public]:
Trac database username []: postgres
Trac database password []: **
Trac database encoding [UTF-8]:
Target project identifier []: project

This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n] Y
rake aborted!
Tracker(#-612473108) expected, got NilClass(#-607860258)
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:262:in `raise_on_type_mismatch'
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:117:in `<<'
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:116:in `each'
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:116:in `<<'
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:141:in `transaction'
/opt/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/opt/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:140:in `transaction'
/opt/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:115:in `<<'
/opt/redmine/lib/tasks/migrate_from_trac.rake:683:in `target_project_identifier'
/opt/redmine/lib/tasks/migrate_from_trac.rake:759
/opt/redmine/lib/tasks/migrate_from_trac.rake:742:in `prompt'
/opt/redmine/lib/tasks/migrate_from_trac.rake:759
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute'
/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:589:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997: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

Actions #6

Updated by Pavel Pivovarov about 13 years ago

Maybe this information may be useful too:

[root@redmine redmine]# ruby --version
ruby 1.8.6 (2010-02-05 patchlevel 399) [i386-linux]
[root@redmine redmine]# gem list rails

  • LOCAL GEMS ***

rails (2.3.4)
[root@redmine redmine]# cat /etc/redhat-release
Fedora release 12 (Constantine)
[root@redmine redmine]# uname -a
Linux redmine.office0.naumen.ru 2.6.32.26-175.fc12.i686.PAE #1 SMP Wed Dec 1 21:45:50 UTC 2010 i686 i686 i386 GNU/Linux

Actions #7

Updated by Etienne Massip about 13 years ago

Not sure it will resolve your issue, but Redmine requires Rails 2.3.5 since 0.9, you have to consider upgrade.

Actions #8

Updated by Pavel Pivovarov about 13 years ago

I am update rails for version 2.3.5 but it's still doesn't work. Crashes with the same error.

Actions #9

Updated by Etienne Massip about 13 years ago

It seems to not find your "Feature" tracker, do you have enabled at least the "Defect" and "Feature" trackers in your project "project" ?

Actions #10

Updated by Pavel Pivovarov about 13 years ago

Brilliant!!! Thank you very much! It's work now very well!

Actions #11

Updated by Jan Niggemann (redmine.org team member) over 10 years ago

  • Status changed from Reopened to Closed

The one who reopened this issue hasn't reported back for 3 years and the last poster says the issue is solved. Closing.

Actions

Also available in: Atom PDF