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. Thanks, GregD On Apr 22, 9:46 am, Chuck Remes <[email protected]> wrote: > On Apr 22, 2010, at 7:52 AM, GregD wrote: > > > Does anyone connect toSybaseusing Sequel? > > > Since there is no native adapter, can I use the generic JDBC adapter? > > > If I use the generic JDBC adapter, how would I connect using ruby and > > not jruby? Do I need rjb gem? > > > I'd like to do this via irb before doing any actual model coding. > > What gems will be required to connect via jdbc? What env variables > > need to be set to get to the java and to thesybasejdbc jar? Will > > just setting the CLASSPATH work? > > > When I first tried to connect with the jdbc connection string, I got: > > > Sequel::AdapterNotFound: LoadError: no such file to load -- java > > The only time I have seen that error was when I tried to run with MRI. If you > saw this error when executing your code under JRuby then there might be a > jruby environment problem. > > You need JRuby to run any of the JDBC adapters. It's the only ruby > environment that understands java. > > cr > > -- > 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.
