D. Taylor Singletary
2006-Apr-06 15:56 UTC
[Rails] Strange Error at the end of a succesful Migration
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060406/b097228f/attachment-0001.html
D. Taylor Singletary
2006-Apr-06 16:29 UTC
[Rails] Re: Strange Error at the end of a succesful Migration
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. On 4/6/06, D. Taylor Singletary <taylorsingletary@gmail.com> wrote:> > > 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. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060406/796227a3/attachment.html
D. Taylor Singletary
2006-Apr-06 17:15 UTC
[Rails] Re: Strange Error at the end of a succesful Migration
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 On 4/6/06, D. Taylor Singletary <taylorsingletary@gmail.com> wrote:> > 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. > > > > > On 4/6/06, D. Taylor Singletary <taylorsingletary@gmail.com> wrote: > > > > > > 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. > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060406/94c4f19c/attachment.html