Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jrubyfx-jarify problem (ANT) #29

Closed
illtellyoulater opened this issue Feb 10, 2013 · 8 comments
Closed

jrubyfx-jarify problem (ANT) #29

illtellyoulater opened this issue Feb 10, 2013 · 8 comments

Comments

@illtellyoulater
Copy link
Contributor

jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706
on Java HotSpot(TM) Client VM 1.7.0_13-b20 [Windows XP-x86]

(I think..) I've updated to the latest jrubyfx gem version using jruby -S gem install jrubyfx
Now the jrubyfx-jarify command doesn't seem to work anymore:

C:\example>jrubyfx-jarify app\ --main app\main.rb myapp.jar

IOError: Cannot run program "ant.bat" (in directory "C:\example"): CreateProcess error=2, Can't find specified file
popen at org/jruby/RubyIO.java:3964
load_from_ant at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:5
load at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:38
Ant at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:61
(root) at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:3
require at org/jruby/RubyKernel.java:1027
require at c:/jruby-1.7.2/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at c:/jruby-1.7.2/lib/ruby/gems/shared/gems/jrubyfx-0.9.2-java/lib/jrubyfx_tasks.rb:1
require at org/jruby/RubyKernel.java:1027
(root) at c:/jruby-1.7.2/lib/ruby/gems/shared/gems/jrubyfx-0.9.2-java/lib/jrubyfx_tasks.rb:22
(root) at c:/jruby-1.7.2/lib/ruby/shared/rubygems/custom_require.rb:1
load at org/jruby/RubyKernel.java:1046
(root) at c:\jruby-1.7.2\bin\jrubyfx-jarify:23

@edubkendo
Copy link
Member

Do you have ant installed and on your Path?

On Sun, Feb 10, 2013 at 2:48 AM, jjgh notifications@github.com wrote:

jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706
on Java HotSpot(TM) Client VM 1.7.0_13-b20 [Windows XP-x86]

(I think..) I've updated to the latest jrubyfx gem version using jruby -S
gem install jrubyfx
Now the jrubyfx-jarify command doesn't seem to work anymore:

C:\example>jrubyfx-jarify app\ --main app\main.rb myapp.jar

IOError: Cannot run program "ant.bat" (in directory "C:\example"):
CreateProcess error=2, Can't find specified file
popen at org/jruby/RubyIO.java:3964
load_from_ant at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:5
load at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:38
Ant at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:61
(root) at c:/jruby-1.7.2/lib/ruby/shared/ant.rb:3
require at org/jruby/RubyKernel.java:1027
require at c:/jruby-1.7.2/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at
c:/jruby-1.7.2/lib/ruby/gems/shared/gems/jrubyfx-0.9.2-java/lib/jrubyfx_tasks.rb:1
require at org/jruby/RubyKernel.java:1027
(root) at
c:/jruby-1.7.2/lib/ruby/gems/shared/gems/jrubyfx-0.9.2-java/lib/jrubyfx_tasks.rb:22
(root) at c:/jruby-1.7.2/lib/ruby/shared/rubygems/custom_require.rb:1
load at org/jruby/RubyKernel.java:1046
(root) at c:\jruby-1.7.2\bin\jrubyfx-jarify:23


Reply to this email directly or view it on GitHubhttps://github.com//issues/29..

@illtellyoulater
Copy link
Contributor Author

no.. but just before I updated jrubyfx it was not required ?

@byteit101
Copy link
Member

Ah, its becuse require ant is on line 22 of jrubyfx_tasks.rb . If I move it to 111 then it does not require it unless you use native bunndle

@illtellyoulater
Copy link
Contributor Author

so do I need to install ANT ?

@BanzaiMan
Copy link
Member

Yes. Please try it. The documentation should be updated.

@byteit101
Copy link
Member

I just pushed a commit to only require ant if you are using Java 8 native packaging tools (which you are not)

@illtellyoulater
Copy link
Contributor Author

Ok I just edited "jrubyfx_tasks.rb" in jrubyfx 0.9.2 gem copying from your commit and now it's all working.
I still get a couple of warnings though..:

C:\example>java -jar myapp.jar
file:/C:/example/myapp.jar!/jrubyfx/dsl.rb:129 warning: already initialized constant NAME_TO_CLASSES
file:/C:/example/myapp.jar!/jrubyfx/dsl.rb:151 warning: already initialized constant ENUM_OVERRIDES

Anyway do you think that you'll be pushing all the changes into a new version of the gem anytime soon? Just asking :)

@byteit101
Copy link
Member

I will, once we finish the WIP changes from #28 . I have been busy studying for finals this week, but a new version should be out by next week.

Interesting... i'll look at that again. dsl.rb is very picky about the way its included...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants