On/El 25/06/08 16:33, Frederick Cheung wrote/escribió:
> On 25 Jun 2008, at 14:58, Grant Croker wrote:
>> The crash occurs due to the looping/recursion as it eventually runs  
>> out of stack space in the process. See http://en.pastebin.ca/raw/1055724 
>>  for the backtrace I get when running rake using --trace. You will  
>> see from the log file that it continually loops against the  
>> following 4 lines:
>> activerecord-2.1.0/lib/active_record/connection_adapters/ 
>> ingres_adapter.rb:398:in `quote'
>> activerecord-2.1.0/lib/active_record/connection_adapters/abstract/ 
>> schema_statements.rb:377:in `add_column_options!'
>> activerecord-2.1.0/lib/active_record/connection_adapters/abstract/ 
>> schema_definitions.rb:272:in `add_column_options!'
>> activerecord-2.1.0/lib/active_record/connection_adapters/abstract/ 
>> schema_definitions.rb:263:in `to_s'
>>     
>
> Hmm, ColumnDefinition aliases to_s to to_sql (and then that calls  
> through to add_column_options!, which calls through to  
> add_column_options! on the adapter itself). Are you calling to_s on  
> something you shouldn't be (perhaps as a debugging aid?)
>
>   
I found the recursive problem - the ingres adapter method quote() makes 
the following call to a trace function:
    complete_trace(" in quote(#{value}, #{column}) ")

which goes to:

def complete_trace (msg)
    if(PRINT_TRACES) then
        puts "\n#{msg}\n"
    end
end


commenting out that line allows the migration to carry on, at least it 
creates the tables now.

It would appear that even when PRINT_TRACES == false that the msg 
(quote(#{value}, #{column})) is being executed. Can you think of a 
reason why that would be?

thanks

grant

-- 
Grant Croker - Ingres PHP, Ruby and Python maintainer
Mark Carwardine's role, essentially, was to be the one who knew what he
was talking about. My role, and one for which I was entirely qualified,
was to be an extremely ignorant non-zoologist to whom everything that
happened would come as a complete surprise.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to