ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
Problems migrating to 2.1.1
Added by Michael Prasuhn at 2011-09-22 05:59 am
Today I tried to upgrade our ChiliProject instance (formerly redmine, all the way back to 0.7 or so...about 3.5 years old) from 1.3 to 2.1.1. I'm not 100% sure I was on 1.3 exactly as I think I just was on master or stable(I remember the date of the commit was on May 1, 2011, so would have been close to 1.3).
Tried to upgrade to the latest stable today and got bundler working and dependencies installed, and ran rake db:migrate a few times but kept getting the following error:
** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == BuildInitialJournalsForActsAsJournalized: migrating ======================= -- Building initial journals for Message -> 0.0005s -- Building initial journals for Attachment -> 3.8817s -- Building initial journals for Document -> 0.2816s -- Building initial journals for Changeset rake aborted! An error has occurred, all later migrations canceled: Change(#-614095038) expected, got Array(#-605669618) /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_proxy.rb:259:in `raise_on_type_mismatch' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:321:in `replace' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:321:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:321:in `replace' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations.rb:1331:in `changes=' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_proxy.rb:149:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_proxy.rb:149:in `send' /var/www/project/app/models/journal.rb:111:in `method_missing' /var/www/project/vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/creation.rb:91:in `recreate_initial_journal!' ./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:44:in `up_without_benchmarks' ./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:40:in `each' ./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:40:in `up_without_benchmarks' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:328:in `say_with_time' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:328:in `say_with_time' ./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:29:in `up_without_benchmarks' ./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:28:in `each' ./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:28:in `up_without_benchmarks' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `__send__' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:491:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:567:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:567:in `ddl_transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:490:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:477:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:477:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:401:in `up' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/migration.rb:383:in `migrate' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/tasks/databases.rake:112 /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Tasks: TOP => db:migrate
Replies (3)
RE: Problems migrating to 2.1.1 - Added by Felix Schäfer at 2011-09-27 06:51 am
Mmh, this seems like an oddity in the data to be migrated, are you (ruby-)savvy enough that I could guide you to the problematic data, or can you provide me with a DB dump?
RE: Problems migrating to 2.1.1 - Added by Michael Prasuhn at 2011-10-06 05:53 am
Actually I think this may be the result of a previous migration, tried to re-run this from backups and the first time I ran it I got a different error:
mdp ~/ex/rails/chiliproject (master): RAILS_ENV=production bundle exec rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== PrepareJournalsForActsAsJournalized: migrating ============================
-- change_table(:journals)
-> 0.6419s
== PrepareJournalsForActsAsJournalized: migrated (0.6422s) ===================
== UpdateJournalsForActsAsJournalized: migrating =============================
-- Updating existing Journals...
-> 7.2055s
-- change_table(:journals)
-> 0.1096s
== UpdateJournalsForActsAsJournalized: migrated (7.3154s) ====================
== BuildInitialJournalsForActsAsJournalized: migrating =======================
-- Building initial journals for Message
-> 0.0006s
-- Building initial journals for Attachment
-> 6.8836s
-- Building initial journals for Document
-> 0.2914s
-- Building initial journals for Changeset
rake aborted!
An error has occurred, all later migrations canceled:
undefined local variable or method `log_encoding' for #<Repository::Bazaar:0x112754690>
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/attribute_methods.rb:260:in `method_missing'
/Users/mdp/ex/rails/chiliproject/app/models/repository.rb:198:in `repo_log_encoding'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/associations/association_proxy.rb:215:in `send'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/Users/mdp/ex/rails/chiliproject/app/models/changeset.rb:91:in `committer'
/Users/mdp/ex/rails/chiliproject/vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/creation.rb:89:in `send'
/Users/mdp/ex/rails/chiliproject/vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/creation.rb:89:in `recreate_initial_journal!'
/Users/mdp/ex/rails/chiliproject/vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/creation.rb:86:in `each'
/Users/mdp/ex/rails/chiliproject/vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/creation.rb:86:in `recreate_initial_journal!'
./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:44:in `up_without_benchmarks'
./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:40:in `each'
./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:40:in `up_without_benchmarks'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:328:in `say_with_time'
/Users/mdp/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/benchmark.rb:293:in `measure'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:328:in `say_with_time'
./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:29:in `up_without_benchmarks'
./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:28:in `each'
./db/migrate//20100714111653_build_initial_journals_for_acts_as_journalized.rb:28:in `up_without_benchmarks'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `send'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate'
/Users/mdp/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/benchmark.rb:293:in `measure'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `__send__'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `migrate'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:491:in `migrate'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:567:in `call'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:567:in `ddl_transaction'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:490:in `migrate'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:477:in `each'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:477:in `migrate'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:401:in `up'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.14/lib/active_record/migration.rb:383:in `migrate'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/gems/rails-2.3.14/lib/tasks/databases.rake:112
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/Users/mdp/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352@global/gems/rake-0.9.2/bin/rake:32
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/bin/rake:19:in `load'
/Users/mdp/.rvm/gems/ruby-1.8.7-p352/bin/rake:19
Tasks: TOP => db:migrate
Subsequent attempts to run the migration result in the error from the original post.
RE: Problems migrating to 2.1.1 - Added by Michael Prasuhn at 2011-10-07 12:36 am
I think I've resolved this temporarily by removing the bazaar repo and it's changsets from the DB manually (they were old an unused).
It still appears that there may be a permanent problem with bazaar repos based on the following error:
undefined local variable or method `log_encoding' for #<Repository::Bazaar:0x112754690>
(1-3/3)