Unable to embed Hpricot gem in a jar file
-----------------------------------------
Key: JRUBY-3299
URL: http://jira.codehaus.org/browse/JRUBY-3299
Project: JRuby
Issue Type: Bug
Components: Embedding
Affects Versions: JRuby 1.1.6
Reporter: Nick Sieger
Assignee: Nick Sieger
Hpricot and other gems that include embedded Java code in jar files don't seem
to work with the gems-in-jars feature.
{noformat}
$ java -jar jruby-complete-1.1.6.jar -S gem install -i ./hpricot hpricot
--no-rdoc --no-ri
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Successfully installed hpricot-0.6.164-java
1 gem installed
[13:32:24][/tmp/hjar]
$ l
total 18224
drwxr-xr-x 6 nicksieger wheel 204 Jan 10 13:32 hpricot/
-rw-r--r-- 1 nicksieger wheel 9328431 Jan 10 13:31 jruby-complete-1.1.6.jar
[13:32:45][/tmp/hjar]
$ jar cf hpricot.jar -C hpricot .
[13:33:06][/tmp/hjar]
$ l
total 19336
drwxr-xr-x 6 nicksieger wheel 204 Jan 10 13:32 hpricot/
-rw-r--r-- 1 nicksieger wheel 568961 Jan 10 13:33 hpricot.jar
-rw-r--r-- 1 nicksieger wheel 9328431 Jan 10 13:31 jruby-complete-1.1.6.jar
[13:33:07][/tmp/hjar]
$ jar tf hpri
hpricot/ hpricot.jar
[13:33:07][/tmp/hjar]
$ jar tf hpricot.jar | more
META-INF/
META-INF/MANIFEST.MF
cache/
cache/hpricot-0.6.164-java.gem
doc/
gems/
gems/hpricot-0.6.164-java/
gems/hpricot-0.6.164-java/.require_paths
gems/hpricot-0.6.164-java/CHANGELOG
gems/hpricot-0.6.164-java/COPYING
...
specifications/
specifications/hpricot-0.6.164-java.gemspec
[13:33:16][/tmp/hjar]
$ l
total 19336
drwxr-xr-x 6 nicksieger wheel 204 Jan 10 13:32 hpricot/
-rw-r--r-- 1 nicksieger wheel 568961 Jan 10 13:33 hpricot.jar
-rw-r--r-- 1 nicksieger wheel 9328431 Jan 10 13:31 jruby-complete-1.1.6.jar
[13:33:16][/tmp/hjar]
$ java -jar jruby-complete-1.1.6.jar -rhpricot.jar -S irb
irb(main):001:0> require 'hpricot'
=> false
irb(main):002:0> h = Hpricot.parse(File.read("index.html"))
NameError: uninitialized constant Hpricot
from
file:/private/tmp/hjar/jruby-complete-1.1.6.jar!/irb/ruby-token.rb:102:in
`const_missing'
from (irb):3:in `irb_binding'
Maybe IRB bug!!
{noformat}
--
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