cancel
Showing results for 
Search instead for 
Did you mean: 

Problem loading DBCAPI in macOS Sierra

2,755

Hi Everybody

Using SqlAnywhere 12 client, Ruby 2.1.5, Rails 4 and macOS Sierra. I think this problem started after upgrading to Sierra. I have been using SqlAnywhere Client successfully for 2-3 years.

After upgrading (I think), the driver (DBCApi) couldn't load anymore. I have sourced sa_config.sh as always. Does anyone have experienced this problem before?

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Participant

Assuming sa_config.sh is setting up your environment correctly, there are a couple of things I can think of that might be affecting you. One is 'System Integrity Protection' introduced by Apple in El Capitan. With it, if you are using binaries provided by Apple such as /usr/bin/ruby then the OS strips away certain environment variables (such as the DYLD_LIBRARY_PATH set by sa_config.sh) when it launches the executable and that means Ruby will not be able to find dbcapi. Apple's stated solution for this is for applications to ship their own version of such executables. Some patches related to this have been made to SQLA shortly after El Capitan came out so make sure you have a recent version of SQLA. You would still need your own copy of Ruby.

If you are using an App that bundles Ruby plus SQLA together then there is a possibility that you are affected by a security feature Apple added to Sierra called Gatekeeper Path Randomization. With that, certain Apps cannot reach outside of their App bundle since their load path is randomized. Whether an App gets its path randomized depends on how you acquired and installed your App. Apps from the Apple store, ones that are installed via signed Apple Installer packages, or come from signed .dmg images are not affected (.dmg signing is new to Sierra). If you downloaded Ruby from the internet and (believe it or not) dragged just the App into the Applications folder, the App is unaffected. If you dragged the App plus at least one other file onto your system in the same, it will be subjected to path randomization. The work-around is to drag the App and its related resources one at a time. Supposedly, Apps that were installed before an upgrade to Sierra are unaffected but I've personally experienced at least one case where that was not true.

0 Kudos

Hi John

I don't know where to find latest upgrades to v16 but I tried with v17 (I downloaded yesterday - so I think it's updated) and unfortunately it didn't work (DBCAPI just didn't load). I've downloaded and installed all software via brew and Terminal so I think I'm not affected by the Gatekeeper randomization. It's very annoying as I have to install everything in a Linux VM just to edit the source code. I wonder if there is anybody using Ruby, SQLAnywhere and macOS Sierra just to compare our environments. If you have any other thoughts...

VolkerBarth
Contributor
0 Kudos

I don't know where to find latest upgrades [...] so I think it's updated

Just post the result of "SELECT @@version", that will help us to know whether that version (a free Developer Edition?) is a current one or not. Those free versions are not necessarily updated when newer EBFs/SPs are available.

The (mostly) current EBF readme files are also available online here... (And no, I can't tell on the OS X issues, sorry)

0 Kudos

Hi Volker my version is free developer 17 version (17.0.0.1063). The issue to get latest version is I have a login name/password to SAP's site but it keeps refusing to allow me login. do you have the site where I can download latest EBFs?

VolkerBarth
Contributor
0 Kudos

Well, since 07/2014 (IIRC), EBFs are no longer publically available, so you have to follow those official instructions, with the following note:

Please note that you must be an SAP customer or partner with an active support plan to access the SAP Support Portal.

Besides that, AFAIK, the free Developer Edition download is updated now and then to a newer EBF level, so you may just try to download the Developer Edition againg to find out whether that is on a newer EBL level now (I don't know)...

0 Kudos

Hi Volker I managed to install latest EBF (dec 2016) but the problem persists. It's strange as javascript driver works flawlessly but I am not able to get Ruby driver work in my mac. It keeps saying that it cannot load DBCAPI library. My hope is that someone who code in Ruby and in mac could be passing by and read this post...

VolkerBarth
Contributor
0 Kudos

someone who code in Ruby and in mac

Sorry, that's not me 😞