-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
LoadError with 'compiled' ruby files with JRuby9000 #3018
Comments
I'm finding the same issue with 9.0.0.0.rc1 also. Your simple test case illustrates it well. It looks like you're using rvm or rbenv to launch jruby. I'm invoking it from jruby-complete.jar and getting the same result. Trying to use "java_import" the ruby classes results in an error like:
Even if I rename the input file "Test.rb" with a capital "T", and it generates a java class called "Test", I still get the error:
By the way, have you noticed how much cleaner the compiled classes are? Version 1.7.20 produces class files that look like this:
|
Ok, this is fixed now for RC2. There's one caveat, however... In order to speed load times, we have removed .class from load searching by default. In order to have JRuby search for .class, you'll need to pass |
JRuby-Rack should be fine ... but Warbler might be affected by the .class loading change // cc @jkutner |
With a quick warbler test, it looks like this fixes the problem (without the |
I am bumping into this issue and I am packaging with warbler on 9.2.0.0 I tried passing this -Djruby.aot.loadClasses=true but the jvm rejected i.e. 1.8.0_171 |
I've opened up a new ticket since this one is closed and doesn't appear to be seen. See #5341 for similar issue in 9.2.0.0 |
Compiling any Ruby code into a class file and trying to load it afterwards leads to "LoadError: use `java_import' to load normal Java classes".
test.rb
compiled and run with
leads to
Happens in both 9.0.0.0.pre2 and current master (393e64f).
This essentially breaks warblers 'compiled' feature - which uses shims in order to transparently load the generated class files (jruby/warbler#325).
The text was updated successfully, but these errors were encountered: