You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that require still does not fully support UNC paths on Winows. I identified different strange problems when starting java -jar with jruby-complete.jar from Windows UNC path (\\server\share\directory). Here is a simple example how to reproduce it with irb:
C:\>java -jar \\server\share\directory\jruby-complete-1.7.24.jar -S irb
LoadError: No such file to load -- irb/error.rb
load at file://server/share/directory/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/irb/locale.rb:112
init_error at file://server/share/directory/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/irb/init.rb:122
setup at file://server/share/directory/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/irb/init.rb:17
start at file://server/share/directory/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/irb.rb:53
(root) at //server/share/directory/jruby-complete-1.7.24.jar!/META-INF/jruby.home/bin/jirb:13
It is not clear why psych.jar appears in the loaded features as there is not such jar file in jruby-complete.jar. If jruby-complete.jar is located in a normal Windows drive directory then there is no such psych.jar in the loaded features (and there is a long list of psych .rb files).
I suspect that one of the causes could be that $LOAD_PATH is not populated correctly:
Found a workaround that I can use -Djruby.home=uri:classloader://META-INF/jruby.home in java command line and then $LOAD_PATH is populated with this JRUBY_HOME prefix and require works correctly.
It seems that
require
still does not fully support UNC paths on Winows. I identified different strange problems when startingjava -jar
withjruby-complete.jar
from Windows UNC path (\\server\share\directory
). Here is a simple example how to reproduce it withirb
:Another strange psych require problem:
It is not clear why
psych.jar
appears in the loaded features as there is not such jar file injruby-complete.jar
. Ifjruby-complete.jar
is located in a normal Windows drive directory then there is no suchpsych.jar
in the loaded features (and there is a long list of psych .rb files).I suspect that one of the causes could be that
$LOAD_PATH
is not populated correctly:In case of UNC path I think the correct prefix should be
file://server/share/...
and notfile:/server/share/...
.Are there any workaround how to run
java
command line withjruby-complete.jar
from a Windows UNC path?The text was updated successfully, but these errors were encountered: