Rvm install jruby-1.6.0.RC1 fails on Ubuntu 10.04 (gcj related ?)

Hi,

I naively tried ‘rvm install jruby-1.6.0.RC1’ as twittered by Wayne.
This is on Ubuntu 10.04. I cannot remember anymore if I explicitely
changed Java related settings on this system, or if this are the
“Ubuntu factory defaults” for Java.

HTH,

Peter

$ rvm get head …
$ rvm reload …
pev@pev-desktop:~$ rvm version

rvm 1.2.2 by Wayne E. Seguin ([email protected])
[http://rvm.beginrescueend.com/]

$pev@pev-desktop:~$ rvm install jruby-1.6.0.RC1
jruby-1.6.0.RC1 - #fetching
jruby-1.6.0.RC1 - #downloading jruby-bin-1.6.0.RC1, this may take a
while depending on your connection…
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 14.0M 100 14.0M 0 0 259k 0 0:00:55 0:00:55 --:–:–
419k
jruby-1.6.0.RC1 - #extracting jruby-bin-1.6.0.RC1 to
/home/pev/.rvm/src/jruby-1.6.0.RC1
jruby-1.6.0.RC1 - #extracted to /home/pev/.rvm/src/jruby-1.6.0.RC1
Building Nailgun
jruby-1.6.0.RC1 - #installing to /home/pev/.rvm/rubies/jruby-1.6.0.RC1
jruby-1.6.0.RC1 - #importing default gemsets (/home/pev/.rvm/gemsets/)
Copying across included gems
Exception in thread “main” java.lang.NoClassDefFoundError:
org.jruby.Main
at gnu.java.lang.MainThread.run(libgcj.so.10)
Caused by: java.lang.ClassNotFoundException: org.jruby.Main not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.10)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.10)
at java.lang.ClassLoader.loadClass(libgcj.so.10)
at java.lang.ClassLoader.loadClass(libgcj.so.10)
at gnu.java.lang.MainThread.run(libgcj.so.10)

pev@pev-desktop:~$ dpkg -l ‘java’ | grep ^ii
ii java-common 0.34
Base of all Java packages
ii libhsqldb-java 1.8.0.10-6ubuntu2
Java SQL database engine
ii libjaxp1.3-java 1.3.04-5ubuntu3
Java XML parser and transformer APIs (DOM, S
ii libjline-java 0.9.94-5
Java library for handling console input
ii libservlet2.3-java 4.0-10ubuntu3
Servlet 2.3 and JSP 1.2 Java classes and doc
ii libservlet2.5-java 6.0.24-2ubuntu1.5
Servlet 2.5 and JSP 2.1 Java API classes
ii libxalan2-java 2.7.1-5ubuntu1
XSL Transformations (XSLT) processor in Java
ii libxerces2-java 2.9.1-4ubuntu1
Validating XML parser for Java with DOM leve
ii openoffice.org-java-common 1:3.2.0-7ubuntu4.1
office productivity suite – arch-independen
ii plasma-scriptengine-javascript 4:4.4.5-0ubuntu1
javascript script engine for Plasma
ii sun-java6-bin 6.20dlj-0ubuntu1.9.10
Sun Java™ Runtime Environment (JRE) 6 (ar
ii sun-java6-jre 6.20dlj-0ubuntu1.9.10
Sun Java™ Runtime Environment (JRE) 6 (ar

pev@pev-desktop:~$ dpkg -l ‘jre’ | grep ^ii
ii gcj-4.4-jre-headless 4.4.3-1ubuntu2
Java runtime environment using GIJ/classpath
ii gcj-4.4-jre-lib 4.4.3-1ubuntu2
Java runtime library for use with gcj (jar f
ii gcj-jre-headless 4:4.4.3-1ubuntu1
Java runtime environment using GIJ/classpath
ii sun-java6-jre 6.20dlj-0ubuntu1.9.10
Sun Java™ Runtime Environment (JRE) 6 (ar

pev@pev-desktop:~$ which java
/usr/bin/java

pev@pev-desktop:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2010-04-01 13:53 /usr/bin/java →
/etc/alternatives/java

pev@pev-desktop:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 16 2010-04-01 13:53 /etc/alternatives/java →
/usr/bin/gij-4.4

Peter V. wrote in post #974559:

Hi,

I naively tried ‘rvm install jruby-1.6.0.RC1’ as twittered by Wayne.

Changed from gcj-4.4 to java-6-sun (1.6.0_20) and now the installation
works.

pev@pev-desktop:~/data/temp$ sudo update-alternatives --config java
[sudo] password for pev:
There are 4 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

  • 0 /usr/bin/gij-4.4 1044 auto
    mode
    1 /usr/bin/gij-4.1 41 manual
    mode
    2 /usr/bin/gij-4.3 43 manual
    mode
    3 /usr/bin/gij-4.4 1044 manual
    mode
    4 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual
    mode

Press enter to keep the current choice[*], or type selection number: 4
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to
provide /usr/bin/java (java) in manual mode.

pev@pev-desktop:~$ java -version
java version “1.6.0_20”
Java™ SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot™ Server VM (build 16.3-b01, mixed mode)

pev@pev-desktop:~$ rvm install jruby-1.6.0.RC1
jruby-1.6.0.RC1 - #fetching
jruby-1.6.0.RC1 - #extracted to /home/pev/.rvm/src/jruby-1.6.0.RC1
(already extracted)
Building Nailgun
jruby-1.6.0.RC1 - #installing to /home/pev/.rvm/rubies/jruby-1.6.0.RC1
jruby-1.6.0.RC1 - #importing default gemsets (/home/pev/.rvm/gemsets/)
Copying across included gems
Fetching: jruby-launcher-1.0.5-java.gem (100%)
Building native extensions. This could take a while…
Successfully installed jruby-launcher-1.0.5-java
1 gem installed
Installing ri documentation for jruby-launcher-1.0.5-java…
Installing RDoc documentation for jruby-launcher-1.0.5-java…

HTH,

Peter