On 5/29/07, Ronald Fischer <ronald.fischer / venyon.com> wrote:
> Hello,
>
> I am investigating ways to connect my Ruby (non-Rails) application on
> Windows
> to either MSSQL, MySql or Oracle databases. ODBC seems to be a common
> way
> for accessing them, so I wonder how to best access ODBC from Ruby.
>
> Searching on the Web, I found solutions using DBI, or the ODBC Library
> at http://www.ch-werner.de/rubyodbc/. Now I wonder:
>
> - Are there other alternative ODBC interfaces?

On windows, DBI and ODBC come with the one click installer, that means
you could use if you wanted something pretty raw but still clean:

Ruport's Query support:
http://api.rubyreports.org/

Or for a little more advanced functionality, Sequel:
http://sequel.rubyforge.org

And ActiveRecord works, too

> - Are some of them available as gem? Which ones?

All three of the above mentioned are

> - Are there interfaces written in "plain ruby", so that the application
> might also run under JRuby? (Of course I can use JDBC on JRuby as an
> alternative - I'm here more interested in Ruby vs. JRuby compatibility).

Ruby DBI and Ruport are close to running on JRuby, but not quite.
I'd love to see folks help get this up and running though.

Sequel, I'm not sure.  I think it's pure ruby but I don't know about
the database drivers for ODBC.