Project

General

Profile

Actions

Defect #5087

closed

migrate_from_trac not work on Redmine 0.9.1

Added by Sebastian Rahlf over 14 years ago. Updated over 13 years ago.

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

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

sudo -u www-data X_DEBIAN_SITEID=default RAILS_ENV=production rake -f /usr/share/redmine/Rakefile redmine:migrate_from_trac --trace
(in /home/pflege)
  • 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 []: /tmp/galileotrac
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: sqlite3
Trac database encoding [UTF-8]:
Target project identifier []: galileo

This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n]

Migrating components....
Migrating milestones....
Migrating custom fields.
rake aborted!
undefined method `find_each' for #<Class:0x7f55d29bc970>
/usr/share/redmine/vendor/rails/activerecord/lib/active_record/base.rb:1835:in `method_missing'
/usr/share/redmine/lib/tasks/migrate_from_trac.rake:461:in `migrate'
/usr/share/redmine/lib/tasks/migrate_from_trac.rake:764
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28


Related issues

Related to Redmine - Patch #4903: migrate_from_mantis not work on Redmine 0.9.1Closed2010-02-23

Actions
Actions #1

Updated by Jean-Philippe Lang over 14 years ago

  • Category set to Importers

I can't reproduce.
Which Rails version are you using? Please have a look at SubmittingBugs.

Actions #2

Updated by Guillermo Gutiérrez over 14 years ago

Yes, I CAN reproduce, the same thing here.

www-data@traccv:/usr/share/redmine$ X_DEBIAN_SITEID=default RAILS_ENV=production rake -f /usr/share/redmine/Rakefile redmine:migrate_from_trac --trace
(in /usr/share/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 []: /var/cache/trac/vidi-ng 
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: sqlite3 
Trac database encoding [UTF-8]: 
Target project identifier []: vidi

This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n] Y

Migrating components
Migrating milestones............
Migrating custom fields....
rake aborted!
undefined method `find_each' for #<Class:0x7f6bbb973668>
/usr/share/redmine/vendor/rails/activerecord/lib/active_record/base.rb:1835:in `method_missing'
/usr/share/redmine/lib/tasks/migrate_from_trac.rake:461:in `migrate'
/usr/share/redmine/lib/tasks/migrate_from_trac.rake:764
/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: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
www-data@traccv:/usr/share/redmine$

Info about my environment:

terrex@traccv:~$ lsb_release -a; dpkg -l redmine postgresql-8.4 ruby1.8 rails subversion; sudo -u www-data X_DEBIAN_SITEID=default RAILS_ENV=production ruby /usr/share/redmine/script/about 
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 9.10
Release:    9.10
Codename:    karmic
Deseado=Desconocido/Instalar/Eliminar/Purgar/Mantener
| Estado=No/Inst/Archivos Cfg/Desempaquetado/Cfg fallido/Medio-inst/Espera/Pediente
|/ Error?=(Nada)/Requiere reinstalación (Estado,Error: Mayúsculas=mal)
||/ Nombre                                 Versión                               Descripción
+++-======================================-======================================-============================================================================================
ii  postgresql-8.4                         8.4.2-0ubuntu9.10                      object-relational SQL database, version 8.4 server
ii  rails                                  2.2.3-1                                MVC ruby based framework geared for web application development
ii  redmine                                0.9.3-0karmic1                         flexible project management web application
ii  ruby1.8                                1.8.7.174-1ubuntu1                     Interpreter of object-oriented scripting language Ruby 1.8
ii  subversion                             1.6.5dfsg-1ubuntu1                     Advanced version control system
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.5
Rails version             2.2.3
Active Record version     2.2.3
Action Pack version       2.2.3
Active Resource version   2.2.3
Action Mailer version     2.2.3
Active Support version    2.2.3
Edge Rails revision       unknown
Application root          /usr/share/redmine
Environment               production
Database adapter          postgresql
Database schema version   20100221100219
terrex@traccv:~$ 
Actions #3

Updated by Sebastian Rahlf over 14 years ago

I can't reproduce.
Which Rails version are you using? Please have a look at SubmittingBugs.

Sorry. Was a bit hasty when filing this bug report. I'm running debian lenny with the redmine packages from lenny-backports:

$ dpkg -l | grep redmine
ii  redmine                             0.9.1-1~bpo50+1          flexible project management web application
ii  redmine-sqlite                      0.9.1-1~bpo50+1          metapackage providing sqlite dependencies for Redmine

Just as in to #4903, I've changed these lines and it worked:

$ diff /usr/share/redmine/lib/tasks/migrate_from_trac.rake.bak /usr/share/redmine/lib/tasks/migrate_from_trac.rake
461c461
<           TracTicket.find_each(:batch_size => 200) do |ticket|
---
>           TracTicket.find(:all) do |ticket|

Actions #4

Updated by Jean-Philippe Lang over 14 years ago

Info about my environment:

> ...
> Rails version             2.2.3
> ...
> 

Redmine 0.9.x runs with 2.3.5, not 2.2.3.
This error does not occur with the appropriate Rails version.

Actions #5

Updated by Marcello Teodori over 14 years ago

Sebastian Rahlf wrote:

Just as in to #4903, I've changed these lines and it worked:
[...]

just a typo, for everything to work:

  TracTicket.find(:all) do |ticket|

should be:
 TracTicket.find(:all).each do |ticket|

Actions #6

Updated by Mike Stupalov over 14 years ago

Please try using a different version migrate_from_trac.rake, from here:
http://github.com/landy2005/Redmine-migrate-from-Trac

Simply replace the file migrate_from_trac.rake in the directory lib/tasks.

For more information, see issue #5035

Actions #7

Updated by Jevgen Gyrynovych over 14 years ago

I resolved this problem edited migrate_from_trac.rake file. I change

TracTicket.find_each(:batch_size => 200) do |ticket| 

to
TracTicket.find(:all).each do |ticket|

And migrate ended sucessfully.

Actions #8

Updated by Mike Stupalov over 14 years ago

Batch processing has appeared only in rails v2.3.

Redmine 0.9.x demands for operation rails v2.3.5, therefore even after successful migration, your installation only with errors will work!

Actions #9

Updated by Etienne Massip over 13 years ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

Closed as due to the use of a Rails version < 2.3.

Actions

Also available in: Atom PDF