# ActiveRecord-JDBC 0.2

**URL:** <https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721>\
**Category:** Ruby\
**Created:** [September 6, 2006, 10:57am UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721 "2006-09-06T10:57:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 6, 2006, 10:57am UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/1 "2006-09-06T10:57:34Z")

</div>

The JRuby-extras project is proud to announce the release of version 0.2  
of ActiveRecord-JDBC.

This release brings much needed functionality and usability. Since  
0.0.1, the project have gone from proof-of-concept to something that’s  
actually usable.

ActiveRecord-JDBC now supports migrations and connections with 8  
databases: MySQL, PostgreSQL, Oracle, MS SQL Server, DB2, Derby,  
FireBird and HSQLDB.  
Most of the standard functionality in ActiveRecord works with these  
databases, and Migrations are also there except for those cases when the  
database cannot support the operation.

The release can be installed as a gem with:

jruby gem install ActiveRecord-JDBC --no-rdoc --no-ri

JRuby-extras: [http://rubyforge.org/projects/jruby-extras/](http://rubyforge.org/projects/jruby-extras/)

–  
Ola B. ([http://ola-bini.blogspot.com](http://ola-bini.blogspot.com))  
JvYAML, RbYAML, JRuby and Jatha contributor  
System Developer, Karolinska Institutet ([http://www.ki.se](http://www.ki.se))  
OLogix Consulting ([http://www.ologix.com](http://www.ologix.com))

“Yields falsehood when quined” yields falsehood when quined.

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 6, 2006, 8:44pm UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/2 "2006-09-06T20:44:49Z")

</div>

Very cool.

Question - for those of us on Unix based OSs like MacOS X, what is the  
best  
way to connect to SQL Server for Rails apps?

I’ve got a system setup to use ODBC but this seems like a simpler  
alternative.

Any idea of performance differences between the solutions?

H

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 6, 2006, 10:23pm UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/3 "2006-09-06T22:23:01Z")

</div>

HH wrote:

> H

Well, either you could use an ODBC solution (that’s the way AWDwR shows  
how to do it) or you use JRuby. Those are really your only options.

–  
Ola B. ([http://ola-bini.blogspot.com](http://ola-bini.blogspot.com))  
JvYAML, RbYAML, JRuby and Jatha contributor  
System Developer, Karolinska Institutet ([http://www.ki.se](http://www.ki.se))  
OLogix Consulting ([http://www.ologix.com](http://www.ologix.com))

“Yields falsehood when quined” yields falsehood when quined.

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 6, 2006, 10:19pm UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/4 "2006-09-06T22:19:00Z")

</div>

On 9/6/06, HH [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Very cool.
> 
> Question - for those of us on Unix based OSs like MacOS X, what is the best  
> way to connect to SQL Server for Rails apps?
> 
> I’ve got a system setup to use ODBC but this seems like a simpler  
> alternative.
> 
> Any idea of performance differences between the solutions?

If you’re on a platform that doesn’t support ODBC very well (basically  
anything non-Windows) the Rails + ActiveRecord-JDBC + SQL Server JDBC  
driver should always work without much fuss. It’s the same code  
everywhere, so it will work on any platform where Java’s supported.

We haven’t done much benchmarking, but it breaks down like this: JRuby  
is still about twice as slow as Ruby for pure interpreted code  
(sometimes more in odd cases), but database access over JDBC should be  
as fast or faster than anything C-based (as the existing Rails  
adapters are). Database IO speed is a strong point for Java, so it  
helps to offset remaining performance issues in JRuby.

–  
Contribute to RubySpec! @ [www.headius.com/rubyspec](http://www.headius.com/rubyspec)  
Charles Oliver N. @ [headius.blogspot.com](http://headius.blogspot.com)  
Ruby U. @ ruby.mn

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 6, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/5 "2006-09-06T23:39:11Z")

</div>

Yeah, as I stated in the message, we have ODBC setup and it works. The  
setup  
is a pain and the tools aren’t great so I thought I would ask if this  
was a  
better solution. Sounds like there’s still some overhead but it is great  
to  
have options.

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 7, 2006, 3:59am UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/6 "2006-09-07T03:59:31Z")

</div>

How would one go about converting to jdbc in rails? What would the  
database.yml need to look like once the gem has been installed?

---

<div class="post-metadata">

**Author:** ![Ola\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Post date:** [September 7, 2006, 4:37am UTC](https://www.ruby-forum.com/t/activerecord-jdbc-0-2/67721/7 "2006-09-07T04:37:35Z")

</div>

Ola and I have pretty good walkthroughs on our blogs:

> **[ActiveRecord-JDBC 0.2.0](http://ola-bini.blogspot.com/2006/09/activerecord-jdbc-020.html)**
>
> Earlier today I finally released version 0.2.0 of ActiveRecord-JDBC. Since it contains fairly big changes I decided to bump the version num...

> **[ActiveRecord-JDBC 0.2.1 Released!](http://headius.blogspot.com/2006/09/activerecord-jdbc-021-released.html)**
>
> I told you it would only be a couple days! ActiveRecord 0.2 has been released . (It's actually 0.2.1 because of a minor Gem glitch) Ola wrap...

On 9/6/06, x1 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > Very cool.
> > > 
> > > “Yields falsehood when quined” yields falsehood when quined.

–  
Contribute to RubySpec! @ [www.headius.com/rubyspec](http://www.headius.com/rubyspec)  
Charles Oliver N. @ [headius.blogspot.com](http://headius.blogspot.com)  
Ruby U. @ ruby.mn
