database.yaml config for DB2 (and other DBMSs..)

S

sjallard

Hi!

I'd like to test Rails with a DB2 database. I thought that a web page
with database.yaml templates for each supported DBMS would be
somewhere on the wiki, but couldn't find such a thing (wiki or
elswhere)..

Is it existing, did I maybe miss it?

In anyway, can someone point me to -or reply with- a description of the
yaml needed for a DB2 connection?

Thanx a lot.
Greetings.
 
S

sjallard

Ok, I've found and tried the following:

development:
adapter: db2
database: test_development
host: my_hostname
username: my_usrname
password: my_pwd

Then, "RUBY SCRIPT/GENERATE MODEL TABLE_NAME"
where TABLE_NAME is a db2 object in my *CURLIB

But the result is:

C:\TEST>ruby script/generate model STSPAP
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/connection_
adapters/abstract/connection_specification.rb:58:in
`establish_connection': data
base configuration specifies nonexistent db2 adapter
(ActiveRecord::AdapterNotFo
und)
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_recor
d/connection_adapters/abstract/connection_specification.rb:50:in
`establish_conn
ection'

...etc etc...

So, thanx for any hint about the adapter (isnt' it included with
Rails??), and about how to "choose" which table I want to generate a
model for, according to the specific architecture of AS/400 systems
(library/file and then member).

Greetings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top