# Strange Error at the end of a succesful Migration

**URL:** <https://www.ruby-forum.com/t/strange-error-at-the-end-of-a-succesful-migration/57033>\
**Category:** Rails\
**Created:** [April 6, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/strange-error-at-the-end-of-a-succesful-migration/57033 "2006-04-06T17:58:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSTaylor\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@DSTaylor\_S](https://www.ruby-forum.com/u/DSTaylor_S)\
**Post date:** [April 6, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/strange-error-at-the-end-of-a-succesful-migration/57033/1 "2006-04-06T17:58:24Z")

</div>

HI all,

I’ve got a migration that creates a few new tables and populates a bunch  
of  
data into those tables from existing models.

It works great. As expected. Tables are created. Relationships are made.  
Everything comes out fine as far as the data goes.

But for some reason the migration task ends with this error:

rake aborted!  
negative argument

I’ve liberally sprinkled my migration with “say” commands so I can see  
where  
this happens, and it happens at the end of the migration after  
everything  
the migration is actually doing has finished.

Any clues?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![DSTaylor\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@DSTaylor\_S](https://www.ruby-forum.com/u/DSTaylor_S)\
**Post date:** [April 6, 2006, 6:29pm UTC](https://www.ruby-forum.com/t/strange-error-at-the-end-of-a-succesful-migration/57033/2 "2006-04-06T18:29:35Z")

</div>

Strangely enough, I’m now getting this error even if I strip down my  
migration to a simple table creation.

No line numbers to the error. With or without a transaction enabled.  
Using  
postgresql as my DB.

I’m going to try switching around my postgres gems and see if it makes  
any  
difference.

---

<div class="post-metadata">

**Author:** ![DSTaylor\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@DSTaylor\_S](https://www.ruby-forum.com/u/DSTaylor_S)\
**Post date:** [April 6, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/strange-error-at-the-end-of-a-succesful-migration/57033/3 "2006-04-06T19:15:54Z")

</div>

My coworker Zach figured this out.

My migration name was too long and the verbose migrations plugin  
couldn’t  
handle it.

He narrowed it down to this line from verbose\_migrations.rb

puts “== %s %s” % [text, “=” \* (75 - text.length)]

So for posterity, if any of you ever have this problem… shorten your  
migration name even though there should never be a limit on such  
things…

Taylor
