Forum: JRuby Accessing PostgreSQL database

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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.