I'm trying to run an example file that comes with ruby-processing, but it crashes with this error each time:
me$ rp5 run ~/rp_samples/samples/processing_app/library/movie/loop.rb
/Users/jimmy/rp_samples/samples/processing_app/library/movie/loop.rb:14 warning: ambiguous Java methods found, using background(int)
Java::JavaLang::UnsatisfiedLinkError
Could not load library: gstreamer
org.gstreamer.lowlevel.GstNative.load(org/gstreamer/lowlevel/GstNative.java:53)
org.gstreamer.lowlevel.GstNative.load(org/gstreamer/lowlevel/GstNative.java:43)
org.gstreamer.Gst.<clinit>(org/gstreamer/Gst.java:101)
java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:513)
RUBY.setup(/rp_samples/samples/processing_app/library/movie/loop.rb:16)
processing.core.PApplet.handleDraw(processing/core/PApplet.java:2361)
processing.core.PGraphicsJava2D.requestDraw(processing/core/PGraphicsJava2D.java:240)
processing.core.PApplet.run(processing/core/PApplet.java:2256)
java.lang.Thread.run(java/lang/Thread.java:695)
Here's what I've tried:
- I was using the bundled (with ruby-processing) jruby-complete, but when this didn't work, I installed the regular jruby package.
- I've already added the line from the answer on this page to resolve a Java::JavaLang::RuntimeException to get this far.
- I found this question for java, but installing gstreamer via homebrew (on a Mac) didn't work and installing the universal pkg from gstreamer hasn't gotten me any further either.
I just want to play with ruby-processing :(. Let me know if I haven't given enough detail, but does anyone have any ideas? Thanks!
--
EDIT
I believe by looking at the gstreamer-java Google group, that the new version of gstreamer (> 1.0) isn't compatible. I found a collection of the old 0.10 gstreamer libs on homebrew and installed them.
I tried a 'sudo find / -iname "gstnative.java"
, and I can't seem to find the GSTNative.java file that this error is coming from. Maybe it's packaged somehow with ruby-processing? Anyway.. I found this line in gstreamer-java/src/org/gstreamer/lowlevel/Main.java:
System.setProperty("jna.library.path", "/usr/share/java:/opt/local/lib:/usr/local/lib:/usr/lib");
If I check for the files mentioned in the below comment (la /usr/local/lib/ | grep "gst"
), I see them all and they're named both ways (0.10.0.dylib or 0.10.dylib). E.g.
lrwxr-xr-x 1 jimms admin 71 Jan 12 15:24 libgstinterfaces-0.10.0.dylib -> ../Cellar/gst-plugins-base010/0.10.36/lib/libgstinterfaces-0.10.0.dylib
lrwxr-xr-x 1 jimms admin 65 Jan 12 15:24 libgstinterfaces-0.10.a -> ../Cellar/gst-plugins-base010/0.10.36/lib/libgstinterfaces-0.10.a
lrwxr-xr-x 1 jimms admin 69 Jan 12 15:24 libgstinterfaces-0.10.dylib -> ../Cellar/gst-plugins-base010/0.10.36/lib/libgstinterfaces-0.10.dylib
So they seem to be there, but maybe I'm not understanding exactly what it's looking for. Any help is appreciated!