[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby DBI

Starke

3/26/2007 2:27:00 PM

I am trying to create a reporting system via rails and iSeries DB2. I
have ruby retrieve records with Ruby DBI. Is there a way to get this
working inside rails?

4 Answers

Damjan Rems

3/26/2007 6:13:00 PM

0

Starke wrote:
> I am trying to create a reporting system via rails and iSeries DB2. I
> have ruby retrieve records with Ruby DBI. Is there a way to get this
> working inside rails?

I see no reason, why you couldn't access your data with DBI inside rails
same as without rails.

by

TheR




--
Posted via http://www.ruby-....

Brian Candler

3/26/2007 6:14:00 PM

0

On Mon, Mar 26, 2007 at 11:30:05PM +0900, Starke wrote:
> I am trying to create a reporting system via rails and iSeries DB2. I
> have ruby retrieve records with Ruby DBI. Is there a way to get this
> working inside rails?

Yes.

Starke

3/26/2007 6:49:00 PM

0

On Mar 26, 1:14 pm, Brian Candler <B.Cand...@pobox.com> wrote:
> On Mon, Mar 26, 2007 at 11:30:05PM +0900, Starke wrote:
> > I am trying to create a reporting system via rails and iSeries DB2. I
> > have ruby retrieve records with Ruby DBI. Is there a way to get this
> > working inside rails?
>
> Yes.

I thought so to, but I guess Im not setting up rails correctly to use
DBI... im just guessing but I tried to setup my database.yml file as

development:
adapter: DBI
dsn: a2401p6
username: STARTCA
password: STARTCA

But it bombs. I really cant find any documenation on using DBI within
rails...

Brian Candler

3/26/2007 7:05:00 PM

0

On Tue, Mar 27, 2007 at 03:50:10AM +0900, Starke wrote:
> On Mar 26, 1:14 pm, Brian Candler <B.Cand...@pobox.com> wrote:
> > On Mon, Mar 26, 2007 at 11:30:05PM +0900, Starke wrote:
> > > I am trying to create a reporting system via rails and iSeries DB2. I
> > > have ruby retrieve records with Ruby DBI. Is there a way to get this
> > > working inside rails?
> >
> > Yes.
>
> I thought so to, but I guess Im not setting up rails correctly to use
> DBI... im just guessing but I tried to setup my database.yml file as
>
> development:
> adapter: DBI
> dsn: a2401p6
> username: STARTCA
> password: STARTCA
>
> But it bombs. I really cant find any documenation on using DBI within
> rails...

Ah, I see what you mean. database.yml is for ActiveRecord. Those values are
passed to ActiveRecord::Base.establish_connection or whatever.

If you want to use DBI, I think you'll have to open the DBI connection
yourself.

Regards,

Brian.