rawr not working for me but I'm new

149 views
Skip to first unread message

amiracam

unread,
Dec 27, 2011, 8:59:38 AM12/27/11
to rawr-lib
first of all , doing a rawr install resulted in a rake file with only
require rawr

if I run : jruby -S rake -T

I do get what seems to be a proper listing of the rake tasks
available

but if I try to run it :

jruby -S rake rawr:build:app
rake aborted!
Don't know how to build task 'rawr:build:app'

(See full trace by running task with --trace)

The code above is from a snippet in a JRuby book where it does a
trivial use case of the hpricot gem. My objective was to use it as a
test case for rawr.

However, I got here because I had tried the monkey bars demo verbatim
(from the monkeybars web site) where everything worked except for the
generation of of viable jar, .app and .exe

the jar did not launch i.e. at least via file association i.e. I
double clicked on it

the .app complained that it was corrupted or malformed

the .exe actually failed to compile i.e. rawr did not manange to
generate the .exe

btw, I'm testing on OS X Lion using the latest download of JRuby with
the ruby language option set to 1.92

any feedback is appreciated.

thanks

James Britt

unread,
Dec 27, 2011, 1:12:07 PM12/27/11
to rawr...@googlegroups.com
amiracam wrote:
> first of all , doing a rawr install resulted in a rake file with only
> require rawr
>
> if I run : jruby -S rake -T
>
> I do get what seems to be a proper listing of the rake tasks
> available

Does that list include rawr:build:app ?


>
> but if I try to run it :
>
> jruby -S rake rawr:build:app
> rake aborted!
> Don't know how to build task 'rawr:build:app'
>
> (See full trace by running task with --trace)

There is

rawr:bundle:app

>
> The code above is from a snippet in a JRuby book where it does a
> trivial use case of the hpricot gem. My objective was to use it as a
> test case for rawr.

Does that book say to run 'rawr:build:app'? I don't think that was ever
an option. Pretty sure it was always "bundle".

James Britt

amiracam

unread,
Dec 28, 2011, 3:43:14 PM12/28/11
to rawr-lib
sorry, I should not have replied from my email digest did not realize
it would add another entirely new post.

I just ran rake from within Rubymine and indeed it found
rawr:bundle:exe. I'm now testing from my Windows box. My original post
was based on testing from my OS X Lion box which is at home. So I get
some errors but perhaps these are monkeybars associated. Again, new to
jruby , so I just don't get too much from the stack other than I
should google for error javac code 127. Any help is appreciated. I'll
try rawr from a trivial non-monkeybars app to see how far I get.

thanks

Stack:

C:\jruby-1.6.5\bin\jruby.exe --1.9 -e $stdout.sync=true;
$stderr.sync=true;load($0=ARGV.shift) C:\jruby-1.6.5\bin\rake
rawr:bundle:exe --trace
(in C:/Users/cod2/GIT/sandbox/MonkeyBars/Test1)
** Invoke rawr:bundle:exe (first_time)
** Invoke rawr:jar (first_time)
** Invoke package/jar/Test1.jar (first_time)
** Invoke package/classes/java/org/rubyforge/rawr/Main.class
(first_time)
** Invoke src/org/rubyforge/rawr/Main.java (first_time, not_needed)
** Invoke package/classes/java (first_time, not_needed)
** Execute package/classes/java/org/rubyforge/rawr/Main.class
javac -target 1.6 -cp lib/java/monkeybars-1.0.4.jar;src -sourcepath
src -d package/classes/java src/org/rubyforge/rawr/Main.java
rake aborted!
Command failed with status (127): [javac -target 1.6 -cp lib/java/
monkeybars-...]
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in
`sh'
org/jruby/RubyProc.java:258:in `call'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in
`sh'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1098:in
`sh'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rawr-1.4.5/lib/rawr.rb:113:in
`(root)'
org/jruby/RubyProc.java:258:in `call'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
org/jruby/RubyArray.java:1612:in `each'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/1.9/monitor.rb:201:in `mon_synchronize'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
org/jruby/RubyArray.java:1612:in `each'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/1.9/monitor.rb:201:in `mon_synchronize'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
org/jruby/RubyArray.java:1612:in `each'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/1.9/monitor.rb:201:in `mon_synchronize'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
org/jruby/RubyArray.java:1612:in `each'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/1.9/monitor.rb:201:in `mon_synchronize'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
org/jruby/RubyArray.java:1612:in `each'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
`run'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
`run'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31:in
`(root)'
org/jruby/RubyKernel.java:1073:in `load'
C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in
`(root)'
org/jruby/RubyKernel.java:1073:in `load'
-e:1:in `(root)'

Process finished with exit code 1

amiracam

unread,
Dec 28, 2011, 3:56:20 PM12/28/11
to rawr-lib
Ok, I have now tried a trivial example and get the stack attached
below. If this is a silly thing , thank you for your patience.

I do noticed that the target jvm specified by the
build_configuration.rb is not what I have loaded i.e.

C:\Users\cod2\GIT\sandbox\TestTrivialRawr>java -version
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

The directory structure of the project was created by using "jruby -S
rawr install"

I have one file named "main.rb" located within the src folder created
by rawr. It contains the following code:

puts "Whats your name"
input = gets
puts "Hello #{input.chomp}"


C:\Users\cod2\GIT\sandbox\TestTrivialRawr>jruby -S rake
rawr:bundle:exe --trace
(in C:/Users/cod2/GIT/sandbox/TestTrivialRawr)
** Invoke rawr:bundle:exe (first_time)
** Invoke rawr:jar (first_time)
** Invoke package/jar/TestTrivialRawr.jar (first_time)
** Invoke package/classes/java/org/rubyforge/rawr/Main.class
(first_time)
** Invoke src/org/rubyforge/rawr/Main.java (first_time, not_needed)
** Invoke package/classes/java (first_time, not_needed)
** Execute package/classes/java/org/rubyforge/rawr/Main.class
javac -target 1.6 -cp lib/java/jruby-complete.jar;src -sourcepath src -
d package/classes/java src/org/r
r/Main.java
rake aborted!
Command failed with status (127): [javac -target 1.6 -cp lib/java/
jruby-compl...]
C:/jruby-1.6.5/bin/rake:19:in `(root)'

On Dec 27, 1:12 pm, James Britt <james.br...@gmail.com> wrote:

amiracam

unread,
Dec 30, 2011, 1:57:29 PM12/30/11
to rawr...@googlegroups.com
it turns out that for some reason the jdk 1.7 installer did not itself to the path and javac was not being found. I can generate the exe (in Windows) fine but when I execute it just hangs for small bit and goes away. I then decided to try to just run the jar and see what I get , here's the output of that:

C:\Users\cod2\GIT\sandbox\TestTrivialRawr\package\jar>java -jar TestTrivialRawr.jar
Exception in thread "main" org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- main
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
        at #<Class:0x64e0bfc9>.(root)(<script>:1)

Please let me know what I'm missing. I don't even know how to start debugging why the exe does not do a thing but may be above is a hint.


thanks in advance

-Charles

James Britt

unread,
Dec 30, 2011, 2:29:29 PM12/30/11
to rawr...@googlegroups.com
amiracam wrote:
> Exception in thread "main" org.jruby.exceptions.RaiseException:
> (LoadError) no such file to load -- main
> at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
> at #<Class:0x64e0bfc9>.(root)(<script>:1)
>
> Please let me know what I'm missing. I don't even know how to start
> debugging why the exe does not do a thing but may be above is a hint.

This is a known problem that has me stumped.

Rawr used to Just Work. Then there was a problem finding things on the
load path (or what the load path should be). I thought this was due to
a change in JRuby, and thought it got fixed, but lately it seems nothing
I do correctly sets up the load path and path resolution for files in jars.

I do not know if these issues are due to changes in JRuby, changes in
Java, or some combination.

James

Reply all
Reply to author
Forward
0 new messages