4
require 'sequel'
require 'jdbc/postgres'
DB = Sequel.connect("jdbc:postgresql://user:pass@domain/database")
DB.tables

Returns:

....(bla bla bla stack trace bla bla bla)....
Sequel::DatabaseConnectionError: Java::OrgPostgresqlUtil::PSQLException: The connection attempt failed.
...........

I have also tried

jdbc:postgresql://domain/database?user=name&pass=word 

and got an error as well, but a different one('password requested but not provided')

ruby 1.9.3 - jruby 1.7.3

I have looked and looked, tried many code samples, but I am unable to get Sequel working So, How do I get Sequel to interface with postgres while using jruby?

1 Answer 1

10

Sequel passes a jdbc connection string directly to JDBC, so there is nothing Sequel-specific about it. You probably want something like jdbc:postgresql://domain/database?user=name&password=secret

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much! This has been bugging me. Silly password= not pass=

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.