https://www.chiliproject.org/2012-10-14T17:09:05+02:00ChiliProjectChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=235492012-10-14T17:09:05+02:00Toshi MARUYAMA
<ul><li><strong>Start date</strong> set to <i>2012-10-15</i></li><li><strong>Subject</strong> set to <i>Error in "rake db:migrate:down VERSION=20100714111652"</i></li><li><strong>Tracker</strong> set to <i>Bug</i></li><li><strong>Priority</strong> set to <i>Normal</i></li><li><strong>Status</strong> set to <i>Open</i></li><li><strong>Project</strong> set to <i>ChiliProject</i></li><li><strong>Description</strong> set to <i>On commit:003fc93b153c9b
<pre>
$ rake db:migrate:down VERSION=20100714...</i> <a href="/journals/23549/diff/description" class="lightbox-ajax">More</a></li></ul> ChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=235502012-10-14T17:12:08+02:00Toshi MARUYAMA
<ul></ul><p>With --trace option</p>
<pre>
$ rake db:migrate:down --trace VERSION=20100714111652 RAILS_ENV=test
** Invoke db:migrate:down (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate:down
== UpdateJournalsForActsAsJournalized: reverting =============================
-- change_table("journals")
-> 0.0229s
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.collect
./db/migrate//20100714111652_update_journals_for_acts_as_journalized.rb:53:in `down_without_benchmarks'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `send'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate'
/home/xxxxxxx/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/benchmark.rb:293:in `measure'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:282:in `migrate'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `__send__'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:365:in `migrate'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:457:in `run'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/activerecord-2.3.14/lib/active_record/migration.rb:409:in `run'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358/gems/rails-2.3.14/lib/tasks/databases.rake:143
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/home/xxxxxxx/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/gems/rake-0.9.2.2/bin/rake:33
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/bin/rake:19:in `load'
/home/xxxxxxx/.rvm/gems/ruby-1.8.7-p358@global/bin/rake:19
Tasks: TOP => db:migrate:down
</pre> ChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=235522012-10-14T17:35:23+02:00Toshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/388/chili-fix-db-migrate-01.diff">chili-fix-db-migrate-01.diff</a> added</li></ul><p>This is a patch to fix.</p> ChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=237532012-12-18T00:56:27+01:00Chris Dähn
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Ready for review</i></li></ul><p>@Felix, Holger & Co.: Could you check the patch or can I help checking it?</p> ChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=239112013-01-14T13:58:03+01:00Felix Schäferfelix+chili@oh14.de
<ul><li><strong>Assignee</strong> set to <i>Felix Schäfer</i></li><li><strong>Target version</strong> set to <i>3.8.0</i></li></ul><p>Chris Dähn wrote:</p>
<blockquote>
<p>@Felix, Holger & Co.: Could you check the patch or can I help checking it?</p>
</blockquote>
<p>In this case confirming the issue and that the fix works for you and/or having a look at the code confirming that the removed variable wasn't used anywhere anyway would have helped :-)</p>
<p>As far as I can see the variable isn't used anywhere in the down migration, merging this soon.</p> ChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=239222013-01-16T22:14:13+01:00Chris Dähn
<ul></ul><p>Thanks and: Sorry, that I couldn't help - thought it was not as easy as it pointed out now <strong>ashamed</strong>...</p> ChiliProject - Bug #1164: Error in "rake db:migrate:down VERSION=20100714111652"https://www.chiliproject.org/issues/1164?journal_id=242992013-03-19T21:53:28+01:00Felix Schäferfelix+chili@oh14.de
<ul><li><strong>Assignee</strong> changed from <i>Felix Schäfer</i> to <i>Holger Just</i></li><li><strong>Status</strong> changed from <i>Ready for review</i> to <i>Closed</i></li></ul><p>Pushed in <a href="https://www.chiliproject.org/projects/chiliproject/repository/revisions/90a05668a0dc3397954cbdbcd35aecfc2d790954" class="changeset" title="fix db migrate #1164">90a05668</a>. Thanks Toshi!</p>