These are chat archives for dry-rb/chat

4th
Jun 2017
Stergio
@stergiom
Jun 04 2017 17:09
Errno::ENOENT: No such file or directory - /Users/usr/Dev/app/out/uri:classloader:/resources/lib/gems/dry-validation-0.10.7/config/errors.yml
             realpath at org/jruby/RubyFile.java:865
     <class:Abstract> at uri:classloader:/resources/lib/gems/dry-validation-0.10.7/lib/dry/validation/messages/abstract.rb:13
    <module:Messages> at uri:classloader:/resources/lib/gems/dry-validation-0.10.7/lib/dry/validation/messages/abstract.rb:9
  <module:Validation> at uri:classloader:/resources/lib/gems/dry-validation-0.10.7/lib/dry/validation/messages/abstract.rb:8
         <module:Dry> at uri:classloader:/resources/lib/gems/dry-validation-0.10.7/lib/dry/validation/messages/abstract.rb:7
               <main> at uri:classloader:/resources/lib/gems/dry-validation-0.10.7/lib/dry/validation/messages/abstract.rb:6
              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 uri:classloader:/resources/lib/gems/dry-validation-0.10.7/lib/dry/validation/messages.rb:1
..

I'm having an issue when packing the dry-validation gem into a jruby app jar,
lib/dry/validation/messages/abstract.rb:13..

DEFAULT_PATH = Pathname(__dir__).join('../../../../config/errors.yml').realpath.freeze

returns the os filepath along with the uri /Users/usr/Dev/app/out/uri:classloader:/resources/lib/gems/dry-validation-0.10.7/config/errors.yml which results in Errno::ENOENT: No such file or directory, I'm using a number of other gems including dry-container, dry-monads, ROM and dry-auto_inject, its only dry-validation that breaks in this way