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.
3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects'
Added by Dan Cameron at 2011-12-22 03:45 am
I'm getting these query errors on a newly installed version of 3.0 (FWIW that was upgraded from a trunk version of redmine).
I was about to add an issue but I wanted to make sure that it wasn't already reported first.
NoMethodError (undefined method `display_subprojects' for #<Query:0x007fa37f993908>): app/models/query.rb:85:in `initialize' app/helpers/queries_helper.rb:76:in `new' app/helpers/queries_helper.rb:76:in `retrieve_query' app/controllers/issues_controller.rb:52:in `index'
Replies (6)
RE: 3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects' - Added by Dan Cameron at 2011-12-22 04:00 am
Forgot to mention:
I'm seeing this on the issues view. I'm getting a similar error on the settings page (the first line of the above error is the same).
RE: 3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects' - Added by Felix Schäfer at 2011-12-22 11:04 am
That sounds like an incomplete upgrade, to be exact: your database seems to lack at least a column in the queries table. Did you successfully (without error) run the rake db:migrate
step?
RE: 3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects' - Added by Dan Cameron at 2011-12-22 04:02 pm
Ah, you reminded me of this, https://www.chiliproject.org/boards/1/topics/729
I forgot a few months ago when I went through this process I had this same issue. I'll try to migrate from 1.8.7 now...wish I knew git enough to revert to 1.8.7 easily.
RE: 3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects' - Added by Dan Cameron at 2011-12-23 12:20 am
I went ahead and upgraded my production site running redmine and updated it to today's trunk, exported the DB and imported into the DB on the new server for chili. I ran the migration and this is the error I'm getting, I did get this error before (which should be why I'm getting the query error above).
mini-lion:chiliproject sproutventure$ bundle exec rake db:migrate RAILS_ENV=production == AddCustomFilterToAuthSources: migrating =================================== -- add_column(:auth_sources, :custom_filter, :string) -> 0.2434s == AddCustomFilterToAuthSources: migrated (0.2435s) ========================== == PrepareJournalsForActsAsJournalized: migrating ============================ -- change_table(:journals) -> 6.5599s == PrepareJournalsForActsAsJournalized: migrated (6.5602s) =================== == UpdateJournalsForActsAsJournalized: migrating ============================= -- Updating existing Journals... -> 53.1930s -- change_table(:journals) -> 1.5088s == UpdateJournalsForActsAsJournalized: migrated (54.7019s) =================== == BuildInitialJournalsForActsAsJournalized: migrating ======================= -- Building initial journals for Message -> 3.1799s -- Building initial journals for Attachment -> 30.5556s -- Building initial journals for Document -> 0.0468s -- Building initial journals for Changeset -> 66.1902s -- Building initial journals for Issue -> 62.6913s -- Building initial journals for TimeEntry -> 38.1766s -- Building initial journals for News -> 0.0007s == BuildInitialJournalsForActsAsJournalized: migrated (200.8437s) ============ == AddChangesFromJournalDetailsForActsAsJournalized: migrating =============== -- Adding changes from JournalDetails -> 45.2358s == AddChangesFromJournalDetailsForActsAsJournalized: migrated (45.2359s) ===== == MergeWikiVersionsWithJournals: migrating ================================== ruby(67434,0x7fff79e69960) malloc: *** error for object 0x7fac086a2460: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap: 6 mini-lion:chiliproject sproutventure$ bundle exec rake db:migrate RAILS_ENV=production --trace ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == MergeWikiVersionsWithJournals: migrating ================================== rake aborted! An error has occurred, all later migrations canceled: Validation failed: Version has already been taken /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/validations.rb:1101:in `save_with_validation!' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/dirty.rb:87:in `save_with_dirty!' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/transactions.rb:200:in `block (2 levels) in save_with_transactions!' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/transactions.rb:182:in `transaction' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/transactions.rb:200:in `block in save_with_transactions!' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/transactions.rb:208:in `rollback_active_record_state!' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/transactions.rb:200:in `save_with_transactions!' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/validations.rb:1070:in `create!' db/migrate//20100804112053_merge_wiki_versions_with_journals.rb:35:in `block in up' db/migrate//20100804112053_merge_wiki_versions_with_journals.rb:34:in `each' db/migrate//20100804112053_merge_wiki_versions_with_journals.rb:34:in `up' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `block in migrate' /Users/sproutventure/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/benchmark.rb:295:in `measure' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `migrate' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:491:in `block (2 levels) in migrate' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:567:in `call' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:567:in `ddl_transaction' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:490:in `block in migrate' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:477:in `each' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:477:in `migrate' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:401:in `up' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-2.3.14/lib/active_record/migration.rb:383:in `migrate' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rails-2.3.14/lib/tasks/databases.rake:112:in `block (2 levels) in <top (required)>' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' /Users/sproutventure/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load' /Users/sproutventure/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>' Tasks: TOP => db:migrate mini-lion:chiliproject sproutventure$
RE: 3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects' - Added by Felix Schäfer at 2012-01-09 11:08 am
(sorry for the delay, I got caught up in the festivities :-) )
Ok, so this:
ruby(67434,0x7fff79e69960) malloc: *** error for object 0x7fac086a2460: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap: 6
is ruby crashing, and as it doesn't properly finish or abort the migration but leaves the DB in an inconsistent state, continuing/"re-running" the migration won't work either.
I can't say why ruby 1.9 craps out though. Currently my only guess would be too many objects to migrate. Could you have a look how many entries your wiki_content_versions
table has?
RE: 3.0 Beta Bug - NoMethodError (undefined method 'display_subprojects' - Added by Dan Cameron at 2012-01-09 02:50 pm
I ended up clearing all my wiki tables and the migration succeeded, I then manually created all the wikis. Not exactly the optimal way of doing things but it worked and since this was the final issue we've been running chili for a couple weeks.
(1-6/6)