# JRuby on gij

**URL:** <https://www.ruby-forum.com/t/jruby-on-gij/133205>\
**Category:** Ruby\
**Created:** [March 28, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205 "2008-03-28T19:00:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [March 28, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205/1 "2008-03-28T19:00:24Z")

</div>

Hello,

Is JRuby supposed to work with gij? It would be probably slow even if  
it did but it throws an exception at the very start.

$ java --version  
java version “1.5.0”  
gij (GNU libgcj) version 4.3.0 20080202 (experimental) [trunk revision  
132072]

Copyright © 2007 Free Software Foundation, Inc.  
This is free software; see the source for copying conditions. There is  
NO  
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.

$ jruby --version  
ruby 1.8.6 (2008-03-18 rev 6255) [i386-jruby1.1RC3]  
Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: -1  
at  
org.jruby.runtime.ThreadContext.getCurrentFrame(ThreadContext.java:350)  
at  
org.jruby.runtime.ThreadContext.getFrameSelf(ThreadContext.java:372)  
at org.jruby.RubyClass.invoke(RubyClass.java:232)  
at  
org.jruby.javasupport.util.RuntimeHelpers.invokeAs(RuntimeHelpers.java:322)  
at  
org.jruby.runtime.Dispatcher$DefaultDispatcher.callMethod(Dispatcher.java:17)  
at org.jruby.RubyClass.invoke(RubyClass.java:222)  
at  
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:330)  
at org.jruby.RubyObject.callMethod(RubyObject.java:481)  
at org.jruby.RubyObject.equals(RubyObject.java:271)  
at java.util.AbstractMap.equals(libgcj.so.90)  
at java.util.WeakHashMap.internalGet(libgcj.so.90)  
at java.util.WeakHashMap.put(libgcj.so.90)  
at org.jruby.util.collections.WeakHashSet.add(WeakHashSet.java:44)  
at org.jruby.RubyClass.addSubclass(RubyClass.java:355)  
at org.jruby.RubyClass.(RubyClass.java:173)  
at org.jruby.RubyClass.newClass(RubyClass.java:184)  
at org.jruby.RubyClass.newClass(RubyClass.java:191)  
at org.jruby.Ruby.defineClassUnder(Ruby.java:655)  
at org.jruby.Ruby.defineClass(Ruby.java:611)  
at org.jruby.RubyBoolean.createFalseClass(RubyBoolean.java:71)  
at org.jruby.Ruby.initCore(Ruby.java:890)  
at org.jruby.Ruby.bootstrap(Ruby.java:851)  
at org.jruby.Ruby.init(Ruby.java:827)  
at org.jruby.Ruby.newInstance(Ruby.java:157)  
at org.jruby.Main.run(Main.java:121)  
at org.jruby.Main.run(Main.java:88)  
at org.jruby.Main.main(Main.java:79)

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [March 28, 2008, 9:15pm UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205/2 "2008-03-28T21:15:55Z")

</div>

On Mar 28, 1:59 pm, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello,
> 
> Is JRuby supposed to work with gij? It would be probably slow even if  
> it did but it throws an exception at the very start.

In my (admittedly rather limited) experience, nothing works with  
gij. 😛

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [March 29, 2008, 7:12am UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205/3 "2008-03-29T07:12:29Z")

</div>

Michal S. wrote:

> Hello,
> 
> Is JRuby supposed to work with gij? It would be probably slow even if  
> it did but it throws an exception at the very start.

This problem has been reported to JRuby already, but we have not had  
time to fix it yet (or at least understand who needs to fix it).

-Tom

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [March 31, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205/4 "2008-03-31T13:18:53Z")

</div>

On 28/03/2008, Karl von Laudermann [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Mar 28, 1:59 pm, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hello,
> > 
> > Is JRuby supposed to work with gij? It would be probably slow even if  
> > it did but it throws an exception at the very start.
> 
> In my (admittedly rather limited) experience, nothing works with  
> gij. 😛

Same here. However, for some reason it’s the default java in Debian :-/

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [April 3, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205/5 "2008-04-03T16:17:34Z")

</div>

On 03/04/2008, Charles Oliver N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Michal S. wrote:

> FWIW, we do want it to work and will gladly accept bug reports on it.
> 
> [http://jira.codehaus.org/browse/JRUBY](http://jira.codehaus.org/browse/JRUBY)

This one is quite obvious - it crashes on startup, every time. Until  
it runs there is not much to report 😉

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [April 3, 2008, 12:47pm UTC](https://www.ruby-forum.com/t/jruby-on-gij/133205/6 "2008-04-03T12:47:41Z")

</div>

Michal S. wrote:

> > 
> 
> Same here. However, for some reason it’s the default java in Debian :-/

FWIW, we do want it to work and will gladly accept bug reports on it.

[http://jira.codehaus.org/browse/JRUBY](http://jira.codehaus.org/browse/JRUBY)

- Charlie
