Why does bundler influence the execution of a native C++ library

120 views Asked by At

I have written a Ruby gem that makes use of the most recent version of FFI to access a (as well self written) shared object library. I am using ruby 2.0.0p247 in conjunction with rvm 1.21.12.

My gem includes an 'executable' in /bin thats works as expected, reads in some data given by the user, and calls one function in my shared object library that in turn calls one function in an external API library. Everything works fine.

If I execute the exact same code of my 'executable' inside an RSpec test, or inside a Rails console, the underlying API components fails. It seems to fail during a SSL operation where a RSA private key read from a PKCS#12 container is used to digitally sign a piece of XML.

I was able to break everything down to bundler. If I execute my (working) 'executable' using bundler, it fails with the same error that I see inside RSpec and Rails.

I crosschecked ENV variables already and set them directly at the execution time. No change.

So the question is: What does bundler do to the execution environment, that lets fail my underlying API component.

Where can I start to look for errors?

Any hints on that are welcome. Regards Felix

0

There are 0 answers