Jruby 1.3.0 + ARJdbc 0.9.1 + jtds 1.2.2 + MSSql 2005 - database.yml format ?

View: New views
3 Messages — Rating Filter:   Alert me  

Jruby 1.3.0 + ARJdbc 0.9.1 + jtds 1.2.2 + MSSql 2005 - database.yml format ?

by Peter Fitzgibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,

I have a standalone ruby script that demonstrates correct connection to my sqlserver database (jdbc.rb in pastie) that succeeds.

I have a Rails 2.3.2 app with this database.yml in pastie .
tds-1.2.2.jar is located in $RUBY_HOME/lib/ruby/1.8/java.  I have also tried unpacking the jar to the same location.
That location is included in $: for both irb and script/console and script/runner
This errors with (extended out in pastie)

The driver encountered an error: cannot load Java class net.sourceforge.jtds.jdbc.Driver 
Any advice or hints on what I could be missing would be greatly greatly appreciated.

Peter Fitzgibbons
(847) 687-7646
Email: peter.fitzgibbons@...
IM GTalk: peter.fitzgibbons
IM Yahoo: pjfitzgibbons
IM MSN: pjfitzgibbons@...
IM AOL: peter.fitzgibbons@...

Re: Jruby 1.3.0 + ARJdbc 0.9.1 + jtds 1.2.2 + MSSql 2005 - database.yml format ?

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 30, 2009 at 7:26 AM, Peter
Fitzgibbons<peter.fitzgibbons@...> wrote:
> tds-1.2.2.jar is located in $RUBY_HOME/lib/ruby/1.8/java.  I have also tried
> unpacking the jar to the same location.

JDBC drivers generally need to be on a system CLASSPATH. Try putting
the jar in <jruby home>/lib instead of in the lib/ruby/1.8/java dir.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Jruby 1.3.0 + ARJdbc 0.9.1 + jtds 1.2.2 + MSSql 2005 - database.yml format ?

by Marnen Laibow-Koser-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Did you ever manage to resolve this issue - I wish to do something
similar with a Sybase DB

Thanks
S
--
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email