The ActiveRecord unit tests do have failures where extra 0s are
appended. You can see it from the following disabled tags in
Merlin\Main\Languages\Ruby\Tests\Scripts\utr\active_record_tests.rb (its
not yet pushed to GIT).
disable InheritanceTest,
# <#<VerySpecialClient id: 780, type: nil, ruby_type:
“VerySpecialClient”, firm_id: nil, firm_name: nil, name: “veryspecial”,
client_of: nil, rating: 1>> expected but was
# <#<VerySpecialClient id: 78, type: nil, ruby_type:
“VerySpecialClient”, firm_id: nil, firm_name: nil, name: “veryspecial”,
client_of: nil, rating: 1>>.
#
# diff:
# - #<VerySpecialClient id: 780, type: nil, ruby_type:
“VerySpecialClient”,
:test_alt_complex_inheritance,
disable HasOneThroughAssociationsTest,
# ActiveRecord::StatementInvalid: DBI::DatabaseError: Arithmetic
overflow error converting expression to data type int.
# The statement has been terminated.: INSERT INTO [memberships]
([joined_on], [club_id], [member_id], [favourite], [type]) VALUES(NULL,
1054009214000000000, 102717546000000000, 0, ‘CurrentMembership’)
# abstract_adapter.rb:201:in log' # sqlserver_adapter.rb:839:in
raw_execute’
# sqlserver_adapter.rb:403:in `execute’
:test_assigning_association_correctly_assigns_target,
From: Ivan Porto C. [mailto:[email protected]]
Sent: Tuesday, January 26, 2010 1:09 AM
To: Jimmy S.
Cc: [email protected]; Shri B.
Subject: Re: [Ironruby-core] Updated Rails instructions
I’m not seeing that issue atm but I’ll work on ironruby-sqlserver
tonight.
So if Sam wants to send me a repro I can also look at the cause for his
problem and hopefully fix it.
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
On Tue, Jan 26, 2010 at 10:06 AM, Jimmy S.
<[email protected]mailto:[email protected]>
wrote:
I wanted to see “p @company” (equivalent of “puts @company.inspect”) to
see what fields it had, since ActiveRecord shows detailed view of the
object, including fields. Really I want to see whether the ID is “269”
or “26900”.
Ivan, does this issue seem at all familiar to you?
Sam, it’d be helpful if you could produce a small repro, just with
ActiveRecord alone, that shows the ID being appended with two zeros. I’d
suggest using script\console as it gives you an environment
preconfigured for ActiveRecord. If we have a targeted repo of the issue,
it’ll be easier to diagnose and fix. Ideally, you could just send me the
application zipped up, but at a minimum I’ll need the migration that
creates the table, the model file, and whatever other code reproduces
the error.
~Jimmy