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