Does anyone have experience building jffi
for a specific platform and inserting the jar into a war file created by
warbler?
I deployed a war file on a Redhat Enterprise Linux machine in a Tomcat
servlet container.
The server returns the following error message:
org.jruby.rack.RackInitializationException: Could not load FFI Provider:
FFI not available: No such file or directory and refers me to http://jira.codehaus.org/browse/JRUBY-4583 for more information.
According to the ticket, I need to build the jffi as outlined. Once I
build jffi, do I just include it in the warbler config file as a jar.
Will the war’ed rails application know where to find the FFI provider?
We have jffi builds for 32- and 64-bit Linux already, so this is
probably an issue of not being able to either load or find the jffi
library.
Try setting JAVA_OPTS=-Djruby.native.verbose=true before starting
Tomcat and see if there’s more information in the log file about
library loading when the original error occurs.
Some notes:
Built the latest ffi jar on the Redhat Linux system following the
directions in the 4583 ticket and placed the generated jffi.jar,
jffi-complete.jar, and jffi-i386-linux.jar in the lib directory of
WEB_INF - no luck.
The warbled war file works without out issue in a tomcat6 container on
my local Mac machine. It is only when deploying to our production Redhat
Enterprise Linux that the error occurs.
The load fails at line 69 in ffi.rb which reads:
require ‘ffi-internal.so’
Any thoughts. Am I missing something obvious?
Thanks!
Yin
Nick S. wrote in post #987931:
We have jffi builds for 32- and 64-bit Linux already, so this is
probably an issue of not being able to either load or find the jffi
library.
Try setting JAVA_OPTS=-Djruby.native.verbose=true before starting
Tomcat and see if there’s more information in the log file about
library loading when the original error occurs.
As I suspected, we had a custom tomcat installation that moved library
paths around. The war file deploys now without issue. Thanks for
everyone’s eyeballs. Sorry to clutter the mailing list.
I did not see you mentioning the jruby version you are using. FYI
jruby-1.6.0.RCx had some classloader issues with the jffi native
libraries. jruby-1.6.0 should work, at least the issues which were
reported until now.
if you use jruby-1.5.x maybe give jruby-1.6.0 a try.
that are just my thoughts reading that thread
regards, Kristian
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.