Forum: Ruby Ruby DBI

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bc7b28bdffd4de7eabcefd6d52a7e5bf?d=identicon&s=25 Starke (Guest)
on 2007-03-26 16:31
(Received via mailing list)
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?
Be07c8d0d6867fd9a0d525f7d17600e2?d=identicon&s=25 Damjan Rems (ther)
on 2007-03-26 20:12
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
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (Guest)
on 2007-03-26 20:15
(Received via mailing list)
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.
Bc7b28bdffd4de7eabcefd6d52a7e5bf?d=identicon&s=25 Starke (Guest)
on 2007-03-26 20:51
(Received via mailing list)
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...
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (Guest)
on 2007-03-26 21:05
(Received via mailing list)
On Tue, Mar 27, 2007 at 03:50:10AM +0900, Starke wrote:
>
> 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.
This topic is locked and can not be replied to.