When trying to load the FFI subsystem (via .so files embedded in jar), it appears that JRuby copies the .so files out of the jar into a temp dir and then loads them from there.
We had a user who was getting a cryptic error message today:
Failed to load native POSIX impl; falling back on Java impl.
After some sleuthing we determined that the user's /tmp dir was mounted noexec. Changing the mount options fixed the problem, but it would be nice to have a better error message. Ideally the error would state that:
- the tmp dir is not executable, and
- what options / flags can be used to change to a different temp dir
Our user was able to use -Djava.io.tmpdir.