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.
05c72472a200794aba7cc3a0a5e58f69?d=identicon&s=25 San K. (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.