under JRuby 1.4.0 with a system that has libncurses installed but not XCurses, I get no error. If I run it under JRuby 1.5.0.RC1 I get:
jruby-1.5.0.RC1/lib/ruby/site_ruby/shared/ffi/library.rb:28:in ffi_lib': Could not open library 'XCurses' : ld.so.1: java: fatal: XCurses: open failed: No such file or directory. Could not open library 'libXCurses.so' : ld.so.1: java: fatal: libXCurses.so: open failed: No such file or directory (LoadError) from jruby-1.5.0.RC1/lib/ruby/site_ruby/shared/ffi/library.rb:10:inmap'
from jruby-1.5.0.RC1/lib/ruby/site_ruby/shared/ffi/library.rb:10:in ffi_lib' from jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/ffi-ncurses-0.3.2/lib/ffi-ncurses.rb:25 from jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/ffi-ncurses-0.3.2/lib/ffi-ncurses.rb:36:inrequire'
from jruby-1.5.0.RC1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from -e:1
If I run
jruby -e 'require "rubygems"; require "ffi-ncurses"'
under JRuby 1.4.0 with a system that has libncurses installed but not XCurses, I get no error. If I run it under JRuby 1.5.0.RC1 I get:
jruby-1.5.0.RC1/lib/ruby/site_ruby/shared/ffi/library.rb:28:in
ffi_lib': Could not open library 'XCurses' : ld.so.1: java: fatal: XCurses: open failed: No such file or directory. Could not open library 'libXCurses.so' : ld.so.1: java: fatal: libXCurses.so: open failed: No such file or directory (LoadError) from jruby-1.5.0.RC1/lib/ruby/site_ruby/shared/ffi/library.rb:10:in
map' from jruby-1.5.0.RC1/lib/ruby/site_ruby/shared/ffi/library.rb:10:inffi_lib' from jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/ffi-ncurses-0.3.2/lib/ffi-ncurses.rb:25 from jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/ffi-ncurses-0.3.2/lib/ffi-ncurses.rb:36:in
require' from jruby-1.5.0.RC1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from -e:1line 25 is:
LIB_HANDLE = ffi_lib( 'ncurses', 'libncurses.so.5', 'XCurses' ).first
this seems to have to do with a change in how ffi_lib behaves with multiple arguments. See
http://groups.google.com/group/ruby-ffi/browse_thread/thread/11b365ae7374c20d/3856ede8fe72ead3?lnk=raot