trac import "Tracker expected, got NilClass"

Added by Peter Fitzgibbons about 9 years ago

Hello everyone,

when importing from a Trac 0.11 database I got the stacktrace below.

Can someone shed some light ?

Tracker expected, got NilClass
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:150:in `raise_on_type_mismatch'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:24:in `<<'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:23:in `each'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:23:in `<<'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/transactions.rb:80:in `transaction'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/transactions.rb:100:in `transaction'
/home/redmine/redmine-0.7.3/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:22:in `<<'
/home/redmine/redmine-0.7.3/lib/tasks/migrate_from_trac.rake:574:in `target_project_identifier'
/home/redmine/redmine-0.7.3/lib/tasks/migrate_from_trac.rake:647
/home/redmine/redmine-0.7.3/lib/tasks/migrate_from_trac.rake:630:in `prompt'
/home/redmine/redmine-0.7.3/lib/tasks/migrate_from_trac.rake:647
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

Replies (1)

RE: trac import "Tracker expected, got NilClass" - Added by Jean-Philippe Lang about 9 years ago

I think you didn't load the Redmine default configuration before trying to import your Trac data.
Run the following and retry:

rake redmine:load_default_data RAILS_ENV="production"

(1-1/1)