Project

General

Profile

Actions

Defect #3291

closed

"undefined method `read' for nil:NilClass" in redmine:migrate_from_trac

Added by Michael Wünsch over 15 years ago. Updated over 15 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

redmine:migrate_from_trac task fails with "undefined method `read' for nil:NilClass" on Redmine 0.8.3. I had to apply the patch from #3254 to get the tickets imported.

% ruby script/about
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.1
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Application root          /var/www/rails_apps/redmine-0.8.3
Environment               development
Database adapter          postgresql
Database schema version   101
% RAILS_ENV=production rake redmine:migrate_from_trac --trace
(in /var/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 []: /root/trac
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: sqlite3
Trac database encoding [UTF-8]:
Target project identifier []: myproject

Migrating components.....
Migrating milestones................
Migrating custom fields...
Migrating tickets........................................
Migrating wiki.........................rake aborted!
undefined method `read' for nil:NilClass
/var/www/rails_apps/redmine-0.8.3/lib/tasks/migrate_from_trac.rake:146:in `read'
/var/www/rails_apps/redmine-0.8.3/app/models/attachment.rb:76:in `before_save'
/var/www/rails_apps/redmine-0.8.3/app/models/attachment.rb:74:in `open'
/var/www/rails_apps/redmine-0.8.3/app/models/attachment.rb:74:in `before_save'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/callbacks.rb:301:in `send'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/callbacks.rb:301:in `callback'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/callbacks.rb:206:in `create_or_update'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:2211:in `save_without_validation'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/validations.rb:911:in `save_without_dirty'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/dirty.rb:75:in `save_without_transactions'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/transactions.rb:106:in `save'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/transactions.rb:79:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/transactions.rb:98:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/transactions.rb:106:in `save'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/transactions.rb:106:in `save'
/var/www/rails_apps/redmine-0.8.3/lib/tasks/migrate_from_trac.rake:573:in `migrate'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:277:in `method_missing'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `method_missing'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `each'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `send'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `method_missing'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:277:in `method_missing'
/var/www/rails_apps/redmine-0.8.3/lib/tasks/migrate_from_trac.rake:565:in `migrate'
/var/www/rails_apps/redmine-0.8.3/lib/tasks/migrate_from_trac.rake:548:in `each'
/var/www/rails_apps/redmine-0.8.3/lib/tasks/migrate_from_trac.rake:548:in `migrate'
/var/www/rails_apps/redmine-0.8.3/lib/tasks/migrate_from_trac.rake:756
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/var/lib/gems/1.8/gems/rake-0.8.4/bin/rake:31
/var/lib/gems/1.8/bin/rake:19:in `load'
/var/lib/gems/1.8/bin/rake:19

Files

migrate_from_trac.rake.patch (1.16 KB) migrate_from_trac.rake.patch Kim Shrier, 2009-05-09 20:13

Related issues

Related to Redmine - Defect #3254: [PATCH] ArgumentError in redmine:migrate_from_tracClosed2009-04-28

Actions
Actions

Also available in: Atom PDF