I'm having difficulty using rawr. The problem occurs under certain
circumstances, during the creation of the target jar file: the rake task
aborts. The key portions of the rawr output look like this (I include
the full output further down):
James,
to follow up: I turned to a second machine I have at home, also with Win7 64-bit. It does not have NetBeans installed, nor monkeybars, nor did it have JRuby on it until I installed it this morning (ver. 1.7.3, 32-bit). I installed rawr with the following command:
jgem install rawr --source http://gems.neurogami.com
That installed rawr-1.6.4 (as well as xml-simple-1.1.2, hoe-3.5.2, s4t-utils-1.0.4, builder-3.2.0, user-choices-1.1.6.1, and rubyzip-0.9.9).
I then recreated the essence of my rawrtest project, all via text editor, and ran the "rawr install" command in the project. I made two changes to build_configuration.rb:
c.executable_type = "console"
c.target_jvm_version = 1.7
I am now getting exactly the same problematic behavior as on my other machine. I have the two "dummy" files, rextra.rb and jextra.java, and I get the jar creation error. If I simply change the file types of both dummy files to .rb, the jar is created successfully. If I change the file types of both dummy files to .java, the jar is created successfully. I also get the same "invalid Unicode Property" warning that I mentioned in my previous post: this appears on both the successful and failed jar creations of rawr.
Should I be getting the rawr gem from somewhere else?
Bruce
On Monday, March 18, 2013 11:08:22 PM UTC-4, Bruce Tesar wrote:
On Monday, March 18, 2013 6:47:26 PM UTC-4, James Britt wrote:Just to be sure I understand this:You have a project structure like this:Rakefilebuild_configuration.rborg\monkeybars\rawr\Main.javasrc\main.rbsrc\rawrtest\Jextra.javasrc\rawrtest\rextra.rblib\java\jruby-complete.jar
Almost. I have src\org\monkeybars\rawr\Main.java
I also have:
build.xml
manifest.mf
Those are the only differences.
jruby -S rake rawr:cleanjruby -S rake rawr:jar
I just tried it again on my setup. The rawr:clean command succeeds (it removes the package subdir). But rawr:jar still produces an "error during the creation of the jar file."
When both commands run, I get a *warning* about an invalid Unicode property (identical for both commands). The actual text of the warning is:
c:/Programs/jruby-1.7.3/lib/ruby/gems/shared/gems/rake-10.0.3/lib/rake/backtrace
.rb:11 warning: invalid Unicode Property \P: /(\Ac:\Programs\jruby-1.7.3|c:/Prog
rams/jruby-1.7.3/lib|c:/Programs/jruby-1.7.3/lib/ruby|c:/Programs/jruby-1.7.3/li
b/ruby/1.9|c:/Programs/jruby-1.7.3/lib/ruby/shared|c:/Programs/jruby-1.7.3/lib/r
uby/1.9/site_ruby|c:/Programs/jruby\-1\.7\.3/lib/ruby/gems/shared/gems/rake\-10\
.0\.3/lib|bin/rake:\d+)/
I haven't tried to decode this in detail, but it looks like it might be a problem with regex processing of path values. The expression looks like a list of paths, separated by '|', with the odd property that the first path in the list uses backslashes, while the rest of them are using forward slashes. The first backslash, after the drive designator c:, is for subdirectory Programs, creating a \P, which matches the "invalid Unicode Property" the warning appears to be complaining about.
I don't know if the warning is related to the error I'm getting with rawr or not, but I bring this up in part because my earlier efforts to track down the problem (in my original post) suggested that the problem involved incorrect path specifications during the construction of the jar. Could it be that our setups differ in some library involved with processing these paths? The warning is originating from a file in the rake gem, which for me is ver. 10.0.3; could the rake version possibly matter? The list of paths mentioned in the warning don't appear to have anything to do with rawr or my test project: they all refer to the jruby installation.
The only project set-up difference that looks possibly significant between us is the location of the Main.java. If you can run rawr on this project without errors, then there must be something incompatible on my end, I'm just not sure what.
I greatly appreciate your taking the time to test this out.
Bruce
If it's any consolation, and I'm sure it's not, I just tried your
rawtest.zip files and sure enough I get that error. On Ubuntu.
Now I need to go see what's going on here.
At least it's repeatable. :)