Hi,
I'm trying to get into JRuby GUI coding and thought Monkeybars was the ideal way of getting around much of Swing pain. Unfortunately it seems that the current version of Monkeybars (1.3.0) has some issues that prevent me from using it.
Here is what I did:
Installed latest JRuby via RVM (1.7.3), latest monkeybars and rawr (through
gems.neurogami.com).
Created a new monkeybars project (jruby -S monkeybars test, cd test, jruby -S rawr install, jruby -S rake generate ALL=src/test)
The problem:
main.rb has a problem from the get go. When running jruby -S src/main.rb, this error pops up:
SyntaxError: src/main.rb:20: syntax error, unexpected tCONSTANT
$LOAD_PATH << File.expand_path File.dirname(__FILE__)
I figured out since that there is a missing set of parentheses. But once I change that and rerun the main.rb, the following error pops up:
NameError: cannot load Java class foxtrot.Worker
for_name at org/jruby/javasupport/JavaClass.java:1227
get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
java_import at file:/Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/jruby.jar!/jruby/java/core_ext/object.rb:26
map at org/jruby/RubyArray.java:2361
java_import at file:/Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
(root) at /Users/tsenguen/.rvm/gems/jruby-1.7.3/gems/monkeybars-1.3.0/lib/monkeybars/task_processor.rb:1
require at org/jruby/RubyKernel.java:1027
(root) at /Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at /Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:55
require at org/jruby/RubyKernel.java:1027
(root) at /Users/tsenguen/.rvm/gems/jruby-1.7.3/gems/monkeybars-1.3.0/lib/monkeybars/view.rb:8
(root) at /Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at org/jruby/RubyKernel.java:1027
require at /Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:55
(root) at /Users/tsenguen/.rvm/gems/jruby-1.7.3/gems/monkeybars-1.3.0/lib/monkeybars/controller.rb:4
require at org/jruby/RubyKernel.java:1027
(root) at /Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1
require at /Users/tsenguen/.rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:55
require at org/jruby/RubyKernel.java:1027
(root) at /Users/tsenguen/.rvm/gems/jruby-1.7.3/gems/monkeybars-1.3.0/lib/monkeybars.rb:4
(root) at src/main.rb:21
This is where I am stuck. Interestingly, when I download the HelloWorld example from your tutorials section, it runs perfectly when I call it the same way (jruby -S src/main.rb).
Any help or suggestions you might be able to offer would be greatly appreciated.