Yup, moving over to sqlserver_adapter.rb+DBI+ADO sounds good. 
sqlserver_adapter.rb comes packaged as a gem, so its easy to get to. It does 
need the simple patch at http://gist.github.com/166062 to use Integrated 
security, and to get it ready for ironruby-dbi. Ray, has this patch been 
accepted?

Running tests using the instructions at 
http://github.com/rails-sqlserver/2000-2005-adapter/blob/f994f7d469ad0125533516fba4ba29a089e5de22/RUNNING_UNIT_TESTS
 give a pass rate of 75% with both IronRuby and MRI. The MRI pass rate is low 
presumably because the sqlserver_adapter project does their testing mainly 
using ODBC. Once Ivan's ironruby-dbi is working, we can plugh that in, and try 
to pull up the pass rate even further.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jimmy Schementi
Sent: Tuesday, August 11, 2009 11:52 AM
To: [email protected]
Subject: Re: [Ironruby-core] ActiveRecord update

Shri, the documentation for running Rails and running the tests still points to 
the mssql-adapter. Want me to move everything over the to the ADO driver for 
now, since that's got the best pass rate?
________________________________
From: [email protected] [[email protected]] 
on behalf of Shri Borde [[email protected]]
Sent: Thursday, July 16, 2009 12:45 PM
To: [email protected]
Subject: [Ironruby-core] ActiveRecord update
I have been working on trying to improve the ActiveRecord test pass rate from 
the low 10% it was it. The summary is that the language support is solid so 
that we can get to within 99% of MRI behavior, but there are a number of 
caveats about the database support. Below I describe the various stacks 
possible for using ActiveRecord with IronRuby:


*         mssql_adapter.rb 
(http://github.com/jschementi/activerecord-mssql-adapter/) - This is the 
ActiveRecord adapter that has been used so far to demo IronRuby using Rails. It 
directly uses ADO.Net. The basics work but it has a pass rate of about 10% 
because it does not have all the fixes from sqlserver_adapter described below.

*         sqlserver_adapter 
(http://github.com/rails-sqlserver/2000-2005-adapter/) - This is the adapter 
that you would need for using SQL Server with MRI. It uses the DBI module 
(http://ruby-dbi.rubyforge.org/). The DBI module in turn depends on a lower 
level adapter, which can be one of three types:

o   ODBC - This is the preferred way for using MRI+Rails. There is no 
equivalent for IronRuby

o   ADO - There is a driver at 
http://www.koders.com/ruby/fid94AB2E1BC823281569CACF9FDAF4093C2ABC7EAA.aspx. 
This is the one I used. The good news is that IronRuby gets to within 99% of 
MRI pass rate! The bad news is that the MRI pass rate is only 66%. The could be 
my machine configuration, issues with the ADO driver, issues with the tests not 
being SQLServer-friendly, etc. It seems that the ADO driver is not supported. 
For example, it relies on an older version of DBI (that also ships with the MRI 
1.8.7 installer) that you can get from 
http://rubyforge.org/frs/download.php/41304/dbi-0.2.2.zip. So it's the best 
solution for now, but may not be in the future.

o   ADO.Net - Ivan has a driver at http://github.com/casualjim/ironruby-dbi/ 
which also gives a pass rate of about 10%. This could potentially be a good 
story in the future since Ivan is looking to improve it.

*         IRDb (http://github.com/rvernagus/activerecord-irdb-adapter) - This 
uses ADO.Net I believe. I don't think Ray has tried running tests with this.

Ray and Ivan have helped me a lot over the past few weeks. Thanks guys! I have 
documented most of the steps to running the tests using mssql_adapter at the 
bottom of 
http://ironruby.net/Documentation/Real_Ruby_Applications/Rails#framework-tests. 
If anyone is interested in pushing on any of the approaches above, let me know 
and I can help you get setup up. Also, I am sure that Ray and Ivan would 
appreciate any help with http://github.com/rvernagus/activerecord-irdb-adapter 
and http://github.com/casualjim/ironruby-dbi/.

Thanks,
Shri

_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to