require_relative fails in jars #737

byteit101 opened this Issue May 14, 2013 · 1 comment


None yet

2 participants

Errno::ENOENT: No such file or directory - /path/to/jar/dir/classpath:jar-bootstrap.rb
      realpath at org/jruby/
       require_relative at file:/path/to/jar/dir/Demo.jar!/jruby/kernel19/kernel.rb:18
        (root) at classpath:jar-bootstrap.rb:19

Repro steps:

  1. Create jar with two files, one with contents require_relative 'other' (only tested when jar is jruby-complete)
  2. Run jar

Prebuilt detection jar: with sha1sum a2fcf685518b16a4b15b108ac20feb6e31469dac
(Build using 1.7.3 and jrubyfx's jarify command on samples/fxml/Demo.rb)
Expected behavior: jrubyfx gui popus up

enebo commented May 15, 2013

Fixed in commit 9a87e6e. fwiw, this special-casing used to fix this is a bit of a hack. I think ultimately we need to make a comprehensive list of tests for File.dirname and File.expand_path with classpath: paths and determine reasonable behavior. Once we do I think we can greatly simplify path processing in multiple places.

@enebo enebo closed this May 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment