The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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?

asked 13 Jan, 05:49

MarcosCunhaLima's gravatar image

MarcosCunhaLima
2467815
accept rate: 0%


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.

permanent link

answered 13 Jan, 09:10

John%20Smirnios's gravatar image

John Smirnios
8.7k377106
accept rate: 40%

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...

(yesterday) MarcosCunhaLima
Replies hidden

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)

(23 hours ago) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×11
×6

question asked: 13 Jan, 05:49

question was seen: 63 times

last updated: 23 hours ago