Accessing PostgreSQL database

Hi
I am trying to access postgreSQL from jruby using postgres-pr. I have
installed it using gem. I am using following code:

require ‘java’
require ‘postgres-pr/connection’

conn= Connection.new(‘postgres’, ‘postgres’)
res=conn.query(‘select * from hoom.test’)

The error I am getting is:

NameError: uninitialized constant Connection
const_missing at org/jruby/RubyModule.java:2690
(root) at jdbConnect.rb:5

The code I am running is from this link

http://www.postgresql.org/message-id/[email protected]

Thanks for help in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs