Jeremy,

Well, I guess I have the connection string wrong then because the
jconn3.jar is correct.

When I do:

DB = Sequel.connect("jdbc:sybase:Tds:host:port?blah..blah)

and then do

DB.tables

I get:

Sequel::DatabaseConnectionError: NoMethodError: undefined method `new'
for nil:NilClass
        from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/adapters/jdbc.rb:170:in `connect'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/database.rb:91:in `initialize'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool.rb:91:in `call'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool.rb:91:in `make_new'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:126:in `make_new
'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:112:in `availabl
e'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:102:in `acquire'

        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:146:in `sync'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:146:in `sync'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:101:in `acquire'

        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/connection_pool/threaded.rb:74:in `hold'
        from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/database.rb:553:in `synchronize'
        from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/adapters/jdbc.rb:366:in `metadata'
        from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/
sequel/adapters/jdbc.rb:254:in `tables'
        from (irb):31

Any clues?  How do I know it is using the jconn3.jar to try the
connection?

Thank,

GregD

On May 20, 11:21 am, Jeremy Evans <[email protected]> wrote:
> On May 20, 8:10 am, GregD <[email protected]> wrote:
>
>
>
>
>
> > I finally got around to trying this with jruby and I'm having no
> > success.  Can anyone help me please?
>
> > In jirb,  I do the following:
> > require 'java'
> > require 'rubygems'
> > require 'sequel'
>
> > Now comes the interesting part:  which Sybase jar file to require?
> > jconn3.jar or jodbc.jar
>
> > require '<path-to-Sybase-Java-lib>/jconn3.jar'
>
> > Now what?
>
> > I tried all kinds of connections strings based on Jconnect format
> > similar to:
>
> > jdbc:sybase:Tds:host:port?
> > ServiceName=database&user=user&password=password
>
> > Does anybody have any experience doing this?  Could someone please
> > help?
>
> > Is jtds driver possible?
>
> > I'd like to use all the ruby goodies to test existing java code like
> > rspec, machinist/factory girl, maybe cucumber with swinger.  However,
> > I don't have a Sybase JDBC adapter for sequel.  Active Record is too
> > hard/too painful to extract from rails.  It looks like Datamapper may
> > not have support either.
>
> > If I have to write an adapter myself, where do I begin?  But, I really
> > don't feel comfortable doing that at this moment.
>
> Sequel passes JDBC connection strings directly to JDBC.  So as long as
> you have a valid JDBC connection string and have loaded the necessary
> jars, it should work with Sequel.  This means that if it is not
> working, you probably don't have a valid JDBC connection string or
> have not loaded the necessary jars.
>
> If you use JTDS, Sequel will attempt to load the jdbc-jtds gem
> automatically, so you may want to try that. When you use JTDS, it
> assumes you are connecting to SQL Server, so it uses SQL Server
> syntax.  Sequel doesn't currently have any special syntax settings for
> Sybase, but you don't need to worry about that until after you can
> connect.
>
> Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sequel-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/sequel-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to