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

Thanks for help in advance