Can I use Hibernate, for example? Active Record? I have to use jdbc for an older database so I have to use jRuby with Ruby on Rails. Thank you.
A:
Using ActiveRecord should be possible, see instructions here.
You can also use Hibernate directly by using JRuby's Java interface, or maybe with some Ruby sugar.
molf
2009-06-11 18:58:01
+1
A:
I am using JDBC and Active Record on JRuby in parallel. In my Rails application I have done it like this:
- the activerecord-jdbc module to connect to the database. This is my default
database.yml
development:
(test and production accordingly)
adapter: jdbc
driver:
url:
username: user
password: pass
- some stuff is accessed via JDBC, the connection is retrieved through this:
ActiveRecord::Base.connection.instance_variable_get(:@connection)
boxofrats
2009-06-11 19:05:50
thank you..everyone.
johnny
2009-06-11 21:12:10