Forum: JRuby Accessing PostgreSQL database

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C704ed8d173aeaf8ebc6d1c621fc9196?d=identicon&s=25 San Ksh (sanksh)
on 2014-01-26 04:45
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='postgres', 'postgres')
res=conn.query('select * from hoom.test')

The error I am getting is:

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

The code I am running is from this link

Thanks for help in advance
This topic is locked and can not be replied to.