-
-
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
require_relative
does not work inside a jar on Windows
#4188
Comments
My fix probably should have just looked for "classpath:". |
I've pushed a fix but I'm not sure the best way to test it. Perhaps you can help us add something under spec/java_integration based on your reproduction? Please confirm the fix works for you, too. |
@headius how can I get a jruby-complete jar for jruby-head? |
@presidentbeef is this still an issue for you? @headius I'm having the same require_relative "./config/application"
VMain.launch C:\Users\usr\Desktop>java -jar app.jar
LoadError: no such file to load -- classpath:C:/config/application
require at org/jruby/RubyKernel.java:961
require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_
ext/kernel_require.rb:55
<main> at classpath:/jar-bootstrap.rb:1 -is there a workaround if so? |
This is a followup to #4000, the fix for which I believe was incomplete: d4cbfd2 I think the issue below is due to the path starting with
classpath:c:/
instead ofclasspath:/
Environment
JRuby 9.1.5.0 complete jar.
Windows 8.1.
Expected Behavior
Load files in jar using
require_relative
.Actual Behavior
Steps to reproduce
Use https://github.com/presidentbeef/jruby-realpath-error
I happened to have a jruby-complete jar in
~/.jruby-jar/
so I use that below to build the jar on Linux. I'm not sure the Linux part is necessary, but that's where I started.Copy jar to a Windows machine and run it:
The text was updated successfully, but these errors were encountered: