Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying postgresql db using ruby

Status
Not open for further replies.

akelabanda

Programmer
Dec 19, 2001
61
IN
Hi

I'm a newbie with ruby. Have an installation of ruby 1.8.4 on windows xp (for some test automation stuff). From here I would like to query some tables on our postgresql DB on a remote linux box.

What do I need to do to query the postgresql db on linux using ruby on windows ?

Thanks for your help in advance.

Regards
Raj

UK's best mobile deals online
 
Raj:

I don't use PostGresSQL, so I'm going to be of limited help. However, here are some links I found that might guide you in the right direction:

1)

2)
3)


On that last link, take a look at how he builds his connection string. I would think if you replicated something like that in your config/database.yml file you'd be able to connect remotely. Something like:

<quote>
development:
adapter: postgresql
database: <name of your database>
username: <user name>
password: <password>
host: <IP of your remote database>
</quote>

I hope that helps in some fashion or another.... :)

Nathan

Want to learn Chinese?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top