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.
Starke (Guest)
on 2007-03-26 18: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?
Damjan R. (Guest)
on 2007-03-26 22: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
Brian C. (Guest)
on 2007-03-26 22: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.
Starke (Guest)
on 2007-03-26 22:51
(Received via mailing list)
On Mar 26, 1:14 pm, Brian C. <removed_email_address@domain.invalid> 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 C. (Guest)
on 2007-03-26 23: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.