chipmunk-rb / chipmunk-ffi

chipmunk ruby bindings using ffi
26 stars 6 forks source link

JRuby : undefined method `struct_class' for #<FFI::StructByValue:CP::Vect> #9

Closed utgarda closed 14 years ago

utgarda commented 14 years ago

Same thing - can't use struct_class with the current jruby-1.5.0-dev chipmunk-ffi-1.1.0/lib/chipmunk-ffi/struct_accessor.rb:41:in resolve_type': undefined methodstruct_class' for #<FFI::StructByValue:CP::Vect (NoMethodError)
from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/struct_accessor.rb:21:in add_struct_reader' from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/struct_accessor.rb:7:instruct_reader' from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/struct_accessor.rb:7:in each' from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/struct_accessor.rb:7:instruct_reader' from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/struct_accessor.rb:16:in struct_accessor' from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/constraints/pin_joint.rb:20 from file:/usr/lib64/ruby/gems/1.8/gems/ruby-processing-1.0.9/lib/core/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/constraints/pin_joint.rb:31:inrequire'

philomory commented 14 years ago

I filed a bug on this with the JRuby project: http://jira.codehaus.org/browse/JRUBY-4715 .

utgarda commented 14 years ago

I voted for that issue.

philomory commented 14 years ago

You may also want to comment to point out that the issue is present in 1.5 as well as 1.4; I only marked 1.4, partly because I've only seen it myself in 1.4, but mostly just by oversight.

utgarda commented 14 years ago

I think that maybe the problem is not with JRuby, but with FFI gems : FFI, FFI-JRuby

utgarda commented 14 years ago

Fixed in JRuby 1.5

philomory commented 14 years ago

Just for reference to avoid confusion among anyone who reads this down the line: In JRuby, FFI is built in; the FFI gem for JRuby is actually completely empty, and exists only so that gems which include 'FFI' as a gem dependency don't whine about a missing dependency when you go to install them.