I'm trying to use the DBI rubygem to connect with a Sybase database. I've installed the dbd-sqlanywhere gem, as well as the sqlanywhere gem but when I try to connect to the Sybase DB I get
Why am I missing the library? Isn't that what the sqlanywhere gem is supposed to be?
I tried installing the driver from this site: http://www.sybase.com/detail?id=1087327 and it still hasn't resolved the issue.
$ irb 2.1.0 :001 > require 'dbi' => true 2.1.0 :002 > DBI.connect('DBI:SQLAnywhere:SERVER') LoadError: Could not load SQLAnywhere DLL from /home/jd/.rvm/gems/ruby-2.1.0/gems/dbd-sqlanywhere-1.0.1/lib/dbd/SQLAnywhere.rb:59:in `initialize' from /home/jd/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/singleton.rb:141:in `new' from /home/jd/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/singleton.rb:141:in `block in instance' from /home/jd/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/singleton.rb:139:in `synchronize' from /home/jd/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/singleton.rb:139:in `instance' from /home/jd/.rvm/gems/ruby-2.1.0/gems/dbd-sqlanywhere-1.0.1/lib/dbd/sqlanywhere/driver.rb:63:in `connect' from /home/jd/.rvm/gems/ruby-2.1.0/gems/dbi-0.4.5/lib/dbi/handles/driver.rb:33:in `connect' from /home/jd/.rvm/gems/ruby-2.1.0/gems/dbi-0.4.5/lib/dbi.rb:148:in `connect' from (irb):2 from /home/jd/.rvm/rubies/ruby-2.1.0/bin/irb:11:in `<main>' 2.1.0 :003 >
Perhaps a dumb question, but have you installed SQL Anywhere on your Linux box and run the .sa_config.[c]sh script (to set the SQLA environment variables) before trying to run your ruby test?
And always a question worth asking: What version / build of SQLA are you using? (although likely not relevant here)
answered 29 Jan '14, 14:32