dtabase access with Ruby

S

Sijo Kg

Hi
If myb doubt is a stupidity please forgive..I was reading a ruby
book as part of learning Ruby and I reached heading accessing database
with Ruby I have installed and running rails project..In the book it
says two methoda to connect a ruby program to database .
Ruby/DBI and
Ruby/odbc
And for the sample program one require "dbi" and other require "odbc"
I tried both these but getting no file to load? So my doubt is if these
are the two methods for accessing database from Ruby how could I access
database without anyof these two in Rails ?Is rails strategy differnet?
I did not understand That is why asking Could you please explain with a
simple code fragment to how a simple ruby program can be connected to
the database I am using postgres And another doubt is if I install dbi
will there any conflict with existing rails functionality?

Thanks in advance
Sijo
 

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,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top