For SQL Server, you are better off using ironruby-dbi + sqlserver_adapter as 
mentioned in the attached email. Ivan has already fixed a number of SQL issues 
in ironruby-dbi. Usage is not streamlined yet though. See 
http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/ActiveRecordTests.rb
 for hints on how to set things up.

I have added a rough note about this to 
http://ironruby.net/Documentation/Real_Ruby_Applications/Rails, but the 
instructions need to be flushed out more. Will be great if you can help flush 
this out...

-----Original Message-----
From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Sam Clopton
Sent: Sunday, January 03, 2010 9:17 AM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] Newwer to Ironruby/ruby

Hey, I have a couple questions dealing with a couple modifications I did
to eliminate errors I was receiving while using rails on IronRuby.
First, mssql_adapter.rb:
In the execute method I commented out set_identity_insert_on and
set_identity_insert_off.  Why is the adapter turning on
set_identitty_insert for columns that end in _id?  Isn't it standard in
rails for foreign keys to end in _id?

Next, in rack-1.0.1\lib\rack\response.rb:
On line 63 in the set_cookie method, the clone method doesn't exist.

Has anyone else experienced similar problems?
I just commented out the set_identity sections in execute.  In
set_cookie, I removed clone and it seemed to work.

Does anyone have better patches or work-arounds than what I have done?

Thanks,
Sam
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

--- Begin Message ---
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: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jimmy Schementi
Sent: Tuesday, August 11, 2009 11:52 AM
To: ironruby-core@rubyforge.org
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: ironruby-core-boun...@rubyforge.org [ironruby-core-boun...@rubyforge.org] 
on behalf of Shri Borde [shri.bo...@microsoft.com]
Sent: Thursday, July 16, 2009 12:45 PM
To: ironruby-core@rubyforge.org
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
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

--- End Message ---
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to