John-Breedloves-Mac-mini:~ john_breedlove$ irb
>> require 'jruby'
=> true
>> require 'zxing'
RuntimeError: ZXing requires JRuby
from /Library/Ruby/Gems/1.8/gems/zxing-0.1.1/lib/zxing.rb:1
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):2
>>
How is this possible?
Further, how would I write that in a ruby script, though? I have a file I want to execute called test.rb, which contains the following:
require 'rubygems'
require 'jruby'
require 'zxing'
ZXing.decode 'test.png'
I am executing it from the command-line like so:
ruby test.rb
In this context, how do I include java? Or is this even possible?