Re: Newbie -- Migration Error

Paul Lynch
2009-06-12T19:01:49Z

In my project, the developer who writes a migration that changes
tables is typically the same person who changes the code to work with
the changes.  But, it sounds like you got these migrations from a
third-party source, someone who is responsible for the data but not
the code written to use it?

Anyway, I would recommend checking to see how "property[:area]" gets
used before commenting out the line.  There could be other changes
needed.  You should also check on how the program uses the other
columns that were removed.  (The column names should most likely
appear somewhere in the code).  You might also want to think about
whether your program needs to do something with the new columns.  This
will all probably involve a lot of digging through the code, reading
it, and understanding what it is doing and why.

On Jun 12, 2:09 pm, Caroline Blaker
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> Paul Lynch wrote:
> > Look at line 16 of sfar_commercial.rb.  The error indicates that some
> > variable (or return value) is nil when then code was expecting an
> > integer.  My guess is that it was trying to index an array with nil
> > (hence the reference to ''[]'').
>
> > On Jun 12, 1:54 pm, Caroline Blaker
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
>
> Ok - this line is as follows
>
>     property[:area] = data[map[''area_display'']]
>
> Not surprisingly this would refer to one of the columns that I just
> migrated out! Apparently the feed author has discontinued it and now
> that my databases are updated I''m getting this error. But I *did
migrate
> it out. I suppose this file does not  follow awareness of migrations.
>
> In any case, is it OK just to comment out this line? I know that Ruby is
> a sensitive system to a lot of scrap hap hazard cutting around the code.
> But hey! that''s what its there for right?
>
> Thanks for all your help.
> --
> Posted viahttp://www.ruby-forum.com/.