Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jruby install broken #963

Closed
joshrendek opened this issue May 15, 2012 · 8 comments
Closed

jruby install broken #963

joshrendek opened this issue May 15, 2012 · 8 comments

Comments

@joshrendek
Copy link

I chatted with @mpapis about this last night, but it appears rvm broke jruby installs in the latest HEAD

I've tried the default JDK 6 that comes with lion, and have tried JDK 7 and 8 as well from OpenJDK

Here is a sample stacktrace from trying to install 1.5.6 and 1.6.7:

https://gist.github.com/2702086

What other information do I need to provide?

I've also asked on #jruby and they were at a loss as well.

Java version:

java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3646)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)

rvm env:

export PATH ; PATH="/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0/bin:/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0@global/bin:/Users/joshrendek/.rvm/rubies/ruby-1.9.3-p0/bin:/Users/joshrendek/.rvm/bin:$PATH"
export rvm_env_string ; rvm_env_string='ruby-1.9.3-p0'
export rvm_path ; rvm_path='/Users/joshrendek/.rvm'
export rvm_ruby_string ; rvm_ruby_string='ruby-1.9.3-p0'
unset rvm_gemset_name
export RUBY_VERSION ; RUBY_VERSION='ruby-1.9.3-p0'
export GEM_HOME ; GEM_HOME='/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0'
export GEM_PATH ; GEM_PATH='/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0:/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0@global'
export MY_RUBY_HOME ; MY_RUBY_HOME='/Users/joshrendek/.rvm/rubies/ruby-1.9.3-p0'
export IRBRC ; IRBRC='/Users/joshrendek/.rvm/rubies/ruby-1.9.3-p0/.irbrc'
unset MAGLEV_HOME
unset RBXOPT

$PATH:

/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0/bin:/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0@global/bin:/Users/joshrendek/.rvm/rubies/ruby-1.9.3-p0/bin:/Users/joshrendek/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Users/joshrendek/bin:/usr/local/texlive/2011/bin/x86_64-darwin
@ghost
Copy link

ghost commented May 15, 2012

@headius might be able to help with this. To me the first (1.5.6) looks like an error in the JDK itself. (Line 14 in the gist) (Looks like it crossed the boundary of the array's max element). @headius thats still the jdk itself right? Not us. We finished the build already.

The second problem, with 1.6.7, could it be that somehow RVM's env settings are either being ignored or lost? (GEM_PATH etc are what I refer to)

/cc @mpapis @bluescripts

@joshrendek
Copy link
Author

@deryldoucette

Heres the output of my rvm gem env command:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.6
  - RUBY VERSION: 1.8.7 (2010-12-03 patchlevel 249) [java]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/jruby-1.5.6
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/jruby-1.5.6/bin/jruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/jruby-1.5.6/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.6
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/jruby-1.5.6
     - /Users/joshrendek/.rvm/gems/jruby-1.5.6@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--env-shebang"
     - "update" => "--env-shebang"
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/
Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main
Caused by: java.lang.ClassNotFoundException: org.jruby.Main
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin11.2.0]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/ree-1.8.7-2011.12
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/ree-1.8.7-2011.12/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/ree-1.8.7-2011.12/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-darwin-11
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/ree-1.8.7-2011.12
     - /Users/joshrendek/.rvm/gems/ree-1.8.7-2011.12@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin11.3.0]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/ree-1.8.7-2012.02
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/ree-1.8.7-2012.02/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-darwin-11
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/ree-1.8.7-2012.02
     - /Users/joshrendek/.rvm/gems/ree-1.8.7-2012.02@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin11.2.0]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.8.7-p357
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/ruby-1.8.7-p357/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.8.7-p357/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-darwin-11
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/ruby-1.8.7-p357
     - /Users/joshrendek/.rvm/gems/ruby-1.8.7-p357@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.9.2-p290
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.9.2-p290/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/ruby-1.9.2-p290
     - /Users/joshrendek/.rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/
Invalid gemspec in [/Users/joshrendek/.rvm/gems/ruby-1.9.3-p0/specifications/tmuxinator-0.5.0.gemspec]: invalid date format in specification: "2011-10-10 00:00:00.000000000Z"
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.15
  - RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-darwin11.2.0]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.9.3-p0
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.9.3-p0/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/ruby-1.9.3-p0
     - /Users/joshrendek/.rvm/gems/ruby-1.9.3-p0@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-darwin11.3.0]
  - INSTALLATION DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.9.3-p194
  - RUBY EXECUTABLE: /Users/joshrendek/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/joshrendek/.rvm/gems/ruby-1.9.3-p194/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/joshrendek/.rvm/gems/ruby-1.9.3-p194
     - /Users/joshrendek/.rvm/gems/ruby-1.9.3-p194@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org/

Its missing Jruby though afaict

Also when I do a rvm list:

~ % rvm list

rvm rubies

   jruby-1.5.6 [ x86_64 ]
=> /Users/joshrendek/.rvm/scripts/list: line 294: /Users/joshrendek/.rvm/rubies/jruby-1.6.7/config: No such file or directory
jruby-1.6.7 [  ]
   ree-1.8.7-2011.12 [ i686 ]
   ree-1.8.7-2012.02 [ i686 ]
   ruby-1.8.7-p357 [ i686 ]
   ruby-1.9.2-p290 [ x86_64 ]
 * ruby-1.9.3-p0 [ x86_64 ]
   ruby-1.9.3-p194 [ x86_64 ]

@joshrendek
Copy link
Author

FWIW I'd prefer to use the latest jruby (1.6.7)

@joshrendek
Copy link
Author

set -x rvm --trace output for jruby 1.6.7

http://bluescripts.net/jruby.txt

Jruby 1.6.7 downloaded and untar'd from the website works fine:
bin/jruby -e "p 'hello'" works fine and prints hello
./jruby gem help also works fine

Inside .rvm/bin jruby 1.5.6 works and does the same,
1.6.7 however does this:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main

So 1.6.7.2 from jruby.org works and the same version that RVM downloads matches with the md5sum, and when I manually extract both (rvm's version and the jruby.org version) both pass the hello world test and work fine.

@ghost
Copy link

ghost commented May 15, 2012

@bluescripts I spoke with @headius about the issue and gave him the URL to your jruby.txt file for the

set -x ; rvm --trace reinstall jruby

output. I copied the info from that file to a gist for inclusion here.
It can be found at https://gist.github.com/2705141

He came into #rvm on freenode to speak with you to work on this, but you weren't around it seems. Please speak with him at your earliest convenience. Also, @headius made mention that one of the gems installed when jruby is installed may have some bad yaml that jruby 1.8 mode's yaml parser doesn't like. He was saying that if you use 1.9 mode you probably won't see this behaviour.

(Seems the yecht yaml parser is not well-maintained anymore and is not used in 1.9 specifically)

Please let me/us know if this helps at all.

@headius
Copy link
Contributor

headius commented May 15, 2012

The first error is a JRuby bug for sure. The YAML engine is walking off some array.

The second error is a bad install of JRuby. If the jruby.org tarballs are good (pretty sure they are) then rvm is unpacking them incorrectly or calling our jruby command incorrectly. I do not know how rvm works internally, though.

@joshrendek
Copy link
Author

The jar was indeed good (@headius showed me how to check) -- I also tried removing rvm completely and just install jruby, still the same issue.

This is also happening on my Mac Pro (so two different macs).

Also happens on my friends mbp as well. He did rvm get head and then ran rvm install jruby 1.6.7.2 and got the same error

This DOES NOT happen on my Debian machine, everything installs fine on there. Same JDK (6), although its OpenJDK

java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

I also tried using bash instead of zsh to run the install, still ran into the same issue.

@joshrendek
Copy link
Author

My .zshrc was fubar'd from a long time ago :(

Apparently if you have $JRUBY_HOME set it will mess with that. Removing $JRUBY_HOME from my zshrc and reloading everything fixed it.

Is there a way to scream at a user that they have this set when they install maybe?

@mpapis mpapis closed this as completed in d1d1162 May 17, 2012
@pkuczynski pkuczynski added this to the rvm-1.27.0-before milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants