Ben Porterfield created JRUBY-6583:
--------------------------------------
Summary: Simple jar built with warbler works in 1.6.7, breaks in
1.7 with require 'haml'
Key: JRUBY-6583
URL: https://jira.codehaus.org/browse/JRUBY-6583
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.7
Environment: jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-03-29 4972b84)
(OpenJDK 64-Bit Server VM 1.7.0-u4-b228) [darwin-amd64-java]
Reporter: Ben Porterfield
Assignee: Thomas E Enebo
Attachments: jar_test.zip
I'm not sure if this belongs here, but I'm not sure where else to put it. Seems
like it's related to upgrading to 1.7 from 1.6.7. I have a simple project set
up with warbler to compile a jar. Simply requiring haml seems to break the jar,
but I can't see anything wrong with the require that comes from haml.
bin/test.rb:
require 'haml'
Gemfile:
source "http://rubygems.org"
gem 'warbler'
gem 'haml'
config/warble.rb:
Warbler::Config.new do |config|
config.features = %w(compiled)
config.dirs = %w(bin)
config.java_libs = FileList["ext/*.jar"]
end
ext/jruby-complete.jar <- newly built jar from jruby master
I've also attached this as a zip, but without the jruby jar. I create the jar
with: bundle exec warble compiled jar. Using 1.6.7, this jar starts fine. In
jruby 1.7, starting the jar results in:
bporterfield@ ~/dev/jar_test$ ruby -v
jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-03-29 4972b84) (OpenJDK 64-Bit Server
VM 1.7.0-u4-b228) [darwin-amd64-java]
bporterfield@ ~/dev/jar_test$ java -jar jar_test.jar
Errno::ENOENT: No such file or directory -
jar:file:/Users/bporterfield/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/VERSION
initialize at org/jruby/RubyFile.java:501
open at org/jruby/RubyIO.java:1099
open at org/jruby/RubyKernel.java:295
read at org/jruby/RubyIO.java:3500
read at org/jruby/RubyIO.java:3597
version at
jar:file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/lib/haml/version.rb:45
Haml at
jar:file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/lib/haml/version.rb:108
(root) at
jar:file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/lib/haml/version.rb:3
require at org/jruby/RubyKernel.java:991
require at
jar:file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/lib/haml/version.rb:36
(root) at
jar:file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/lib/haml.rb:4
require at org/jruby/RubyKernel.java:991
require at
jar:file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/gems/haml-3.1.4/lib/haml.rb:59
(root) at bin/test.rb:1
load at org/jruby/RubyKernel.java:1017
(root) at
file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/META-INF/main.rb:1
require at org/jruby/RubyKernel.java:991
require at
file:/Users/bporterfield/Dropbox/dev/jar_test/jar_test.jar!/META-INF/main.rb:36
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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