require 'syslog' fails when using jar files from jruby-jars gems
----------------------------------------------------------------
Key: JRUBY-4227
URL: http://jira.codehaus.org/browse/JRUBY-4227
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4
Environment: Mac OS X
Reporter: Pat Cheng
java -cp jruby-stdlib-1.4.0.jar -jar jruby-core-1.4.0.jar -e "require 'syslog'"
-e:1:in `require': no such file to load -- syslog (LoadError)
from -e:1
I traced it down to:
...
LoadService: trying builtinLib:
file:/Users/pcheng/Downloads/apache-tomcat-6.0.20/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/platform/i386-darwin/syslog.rb
LoadService: trying resourceFromJarURL:
me/lib/ruby/site_ruby/shared/ffi/platform/i386-darwin/syslog.rb
noticed the path is 'me/lib'.
>From what I can tell, inside tryResourceFromJarURL
it breaks the path into jar file path, and the path inside the jar file.
The part I don't understand is the call to canonicalizePath(). Not sure why the
path inside a jar file needs to be canonicalize.
And more curious, canonicalizePath() does a pretty bind substring() without
make sure the first X characters machines the current directory.
As it stands
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
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