Issue Type: Bug Bug
Affects Versions: JRuby 1.7.3
Assignee: Unassigned
Attachments: 0001-Fix-the-require_relative-issue.patch
Components: Core Classes/Modules
Created: 26/Apr/13 7:13 PM
Description:

require_relative call from inside jruby-complete.jar fails when jruby-complete.jar is in a directory with spaces

To reproduce:
Make krypt.rb perform a require_relative which makes File.realpath raise in jruby 1.7.3 and makes require raise in 614ba113ee3e91168221bd3bb2c872f093dc9f63 (todays HEAD)

Output from todays HEAD
~/.wine/drive_c/Program Files (x86)/flesk
$ java -jar jruby-complete.jar -e "require 'krypt'"
LoadError: no such file to load – jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/krypt_missing
require at org/jruby/RubyKernel.java:1028
require at jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36
require_relative at file:/home/syvensta/.wine/drive_c/Program Files (x86)/flesk/jruby-complete.jar!/jruby/kernel19/kernel.rb:19
(root) at jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/krypt.rb:37
require at org/jruby/RubyKernel.java:1028
(root) at jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1
(root) at -e:1

Output with 1.7.3 (actually I have patched HEAD with the 1.7.3 version of kernel.rb)
~/.wine/drive_c/Program Files (x86)/flesk
$ java -jar jruby-complete.jar -e "require 'krypt'"
Errno::ENOENT: No such file or directory - jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/krypt.rb
realpath at org/jruby/RubyFile.java:763
require_relative at file:/home/syvensta/.wine/drive_c/Program Files (x86)/flesk/jruby-complete.jar!/jruby/kernel19/kernel.rb:23
(root) at jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/krypt.rb:37
require at org/jruby/RubyKernel.java:1028
(root) at jar:file:/home/syvensta/.wine/drive_c/Program%20Files%20(x86)/flesk/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1
(root) at -e:1
The problem seems to be that we pass an urlencoded url to the File class (RubyFile and friends) which they do not support.

Environment: linux, windows
Project: JRuby
Priority: Major Major
Reporter: Syver Enstad
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to