I want to access via ruby ​​in 64 bit on the sybase-db (os is windows). And get the following error:

"Could not load SQLAnywhere DBCAPI library".

What can be the reason for this? The path details should fit.

Thanks and Greetings Pascal

asked 14 Aug '17, 07:49

pmichel29021980's gravatar image

accept rate: 0%

do you have the 32 or 64-bit installation of SA?

here is a small copy-paste from dcx.sap.com:

For Windows, make sure that the 64-bit or 32-bit DLLs (dbcapi.dll, dblib17.dll, dbicu17.dll, dbicudt17.dll, dblgen17.dll, dbextenv17.dll, and dbrsa17.dll) can be located. Check that the database server bin32 or bin64 folder is in your PATH.

(14 Aug '17, 09:44) Vlad
Replies hidden

it is an 64 bit installation, but with all the 32 bit items. the bin32 and the bin64 path is in the path-variable. i also do that:

irb(main):001:0> require 'sqlanywhere'
=> true
irb(main):002:0> api = SQLAnywhere::SQLAnywhereInterface.new()
=> #<sqlanywhere::sqlanywhereinterface:0x00000002dc90b8>
irb(main):003:0> SQLAnywhere::API.sqlany_initialize_interface( api )
=> 0
irb(main):004:0> api.sqlany_init()
(irb):4: [BUG] Segmentation fault
ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]

-- Control frame information -----------------------------------------------
c:0020 p:---- s:0099 e:000098 CFUNC  :sqlany_init
c:0019 p:0007 s:0095 e:000094 EVAL   (irb):4 [FINISH]
c:0018 p:---- s:0092 e:000091 CFUNC  :eval
c:0017 p:0025 s:0084 e:000083 METHOD C:/Ruby24-x64/lib/ruby/2.4.0/irb/workspace.rb:87
c:0016 p:0027 s:0076 e:000074 METHOD C:/Ruby24-x64/lib/ruby/2.4.0/irb/context.rb:381

You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Any Idea???

Thanks, Pascal

(15 Aug '17, 02:23) pmichel29021980

As Vlad has asked: Are the mentioned DLLs like dbcapi.dll in the according %SQLANY17%\bin64 subdirectory?

(15 Aug '17, 03:08) Volker Barth

yes, they are there...

(15 Aug '17, 03:15) pmichel29021980

You said ... the bin32 and the bin64 path is in the path-variable ... which makes me think that you have these folders listed in that order (32-bit first, then 64-bit). Try listing them in the reverse order or, better yet, if you are using 64-bit software don't include the 32-bit folder in PATH.

(15 Aug '17, 11:07) JBSchueler

Is there a particular reason the question is downvoted (twice)?

(16 Aug '17, 03:39) Volker Barth

Thank you Mr. Barth, this question is justified ...

A small update. If I use Ruby in version 2.3.3 as 64 bit, then everything works fine.

Here I use the "old" DevKit to build / install the GEM, and this seems to work.

With Ruby 2.4.1 in 64 bit and the supplied MySYS2 Toolkit there are seemingly problems to build / install the GEM error-free.

Many greetings, Pascal

(16 Aug '17, 05:35) pmichel29021980
showing 4 of 7 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Aug '17, 07:49

question was seen: 614 times

last updated: 16 Aug '17, 05:35