Newbie can't find java.rb

Hi Everyone,

I would like to use ruby2java on Debian/Linux, but I have a problem
getting started.

ruby2java fails, because java.rb is not found (see below).
This is the same error I get when I do $ ruby -e ‘require “java”’

The only java.rb on my filesystem is this one:
/usr/lib/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/java.rb

strace tells me ruby2java is scanning all the gems for java.rb, but it
seems to me that javasupport.rb is the one that should be included. Some
initialization seems to be missing.

jruby runs fine.

Thanks for helping!

Bart

$ ruby2java
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': no such file to load -- java (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from
/var/lib/gems/1.8/gems/bitescript-0.0.4/lib/bitescript/asm.rb:1
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from /var/lib/gems/1.8/gems/bitescript-0.0.4/lib/bitescript.rb:2
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from
/home/guus/.gem/ruby/1.8/gems/ruby2java-0.0.2/bin/…/lib/compiler.rb:2
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from
/home/guus/.gem/ruby/1.8/gems/ruby2java-0.0.2/bin/…/lib/ruby2java.rb:1
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from
/home/guus/.gem/ruby/1.8/gems/ruby2java-0.0.2/bin/ruby2java:2
from /var/lib/gems/1.8/bin/ruby2java:19:in `load’
from /var/lib/gems/1.8/bin/ruby2java:19

On Mon, Jan 18, 2010 at 12:00 PM, Bart E. [email protected] wrote:

Hi Everyone,

I would like to use ruby2java on Debian/Linux, but I have a problem
getting started.

ruby2java fails, because java.rb is not found (see below).
This is the same error I get when I do $ ruby -e ‘require “java”’

ruby2java is only for JRuby; you are running it with “C Ruby”, the
standard Ruby, MRI…whatever you like to call it.

The “java” library is a built-in part of JRuby, and there’s no
external library or gem for MRI that provides its functionality.

You will want to run “jruby” instead of “ruby”.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Thanks!

What confused me is the generic ruby2java gem.

Bart.

Charles Nutter wrote:

On Mon, Jan 18, 2010 at 12:00 PM, Bart E. [email protected] wrote:

Hi Everyone,

I would like to use ruby2java on Debian/Linux, but I have a problem
getting started.

ruby2java fails, because java.rb is not found (see below).
This is the same error I get when I do $ ruby -e ‘require “java”’

ruby2java is only for JRuby; you are running it with “C Ruby”, the
standard Ruby, MRI…whatever you like to call it.

The “java” library is a built-in part of JRuby, and there’s no
external library or gem for MRI that provides its functionality.

You will want to run “jruby” instead of “ruby”.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Yeah, we have sometimes forgotten to put the “java” platform on gems
that only work on JRuby. We’ll try to fix that in the future.

On Tue, Jan 19, 2010 at 11:49 AM, Bart E. [email protected] wrote:

I would like to use ruby2java on Debian/Linux, but I have a problem

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email