monkeybars/monkeybars-core — Issue #1: Unable to run empty app
Author: rurounijones
Created: 2011-10-17 08:13:11+00:00
State: open

I am unable to run an empty monkeybars application.

Attempting to use JRuby directly fails with one error while using rawr to create a JAR and then running the JAR resutls in a different error.

I am using Kubuntu 10.04 64 Bit with RVM JRuby 1.6.3

I have looked around the various documentation but nothing seems obvious.

Below is the entire output from monkeybars installation to errors.

````
$ rvm use jruby@monkeybars
Using /home/jjones/.rvm/gems/jruby-1.6.3 with gemset monkeybars
$ gem install monkeybars
Fetching: xml-simple-1.1.1.gem (100%)
Fetching: hoe-2.12.3.gem (100%)
Fetching: s4t-utils-1.0.4.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: user-choices-1.1.6.1.gem (100%)
Fetching: rubyzip-0.9.4.gem (100%)
Fetching: rawr-1.5.0.gem (100%)
Fetching: swingset-0.3.0.gem (100%)
Fetching: monkeybars-1.1.1.gem (100%)
Successfully installed xml-simple-1.1.1
Successfully installed hoe-2.12.3
Successfully installed s4t-utils-1.0.4
Successfully installed builder-3.0.0
Successfully installed user-choices-1.1.6.1
Successfully installed rubyzip-0.9.4
Successfully installed rawr-1.5.0
Successfully installed swingset-0.3.0
Successfully installed monkeybars-1.1.1
9 gems installed

$ monkeybars test_app
Creating directory test_app
jruby -S rawr install test_app
Running in jruby 1.6.3 (ruby-1.8.7-p330) [linux-i386-java]
Create rawr files using {:wordy=>false,
:class=>"org.rubyforge.rawr.Main",
:directory=>"src",
:build_config_file=>"build_configuration.rb",
:local_jruby_jar=>nil,
:no_config=>"false",
:show_version=>false,
:no_download=>"false",
:no_jar=>"false",
:command=>["install", "test_app"]}

write config file
Creating Rawr configuration file build_configuration.rb
option project_name: test_app
option output_dir: package
option main_ruby_file: main
option main_java_file: org.rubyforge.rawr.Main
option source_dirs: src
option source_exclude_filter:
option compile_ruby_files: true
option java_lib_files:
option java_lib_dirs: lib/java
option files_to_copy:
option target_jvm_version: 1.6
option jvm_arguments:
option java_library_path:
option extra_user_jars:
option mac_do_not_generate_plist:
option mac_icon_path:
option windows_icon_path:
Creating Java class /home/jjones/Projects/Desktop/test_app/src/org/rubyforge/rawr/Main.java
Creating Rakefile ...
Downloading jruby-complete.jar. This may take a moment...
All done!

Copying monkeybars project structure
Installing swingset ...
cp -r /home/jjones/.rvm/gems/jruby-1.6.3@monkeybars/gems/swingset-0.3.0/lib/swingset lib/ruby
cp -r /home/jjones/.rvm/gems/jruby-1.6.3@monkeybars/gems/swingset-0.3.0/lib/swingset.rb lib/ruby
cp -r /home/jjones/.rvm/gems/jruby-1.6.3@monkeybars/gems/swingset-0.3.0/lib/swingset_utils.rb lib/ruby
Have mig jar at /home/jjones/.rvm/gems/jruby-1.6.3@monkeybars/gems/swingset-0.3.0/lib/java/miglayout-3.7.3.1.jar
cp -r /home/jjones/.rvm/gems/jruby-1.6.3@monkeybars/gems/swingset-0.3.0/lib/java/miglayout-3.7.3.1.jar lib/java

$ cd test_app

$ jruby src/main.rb
LoadError: no such file to load -- monkeybars
require at org/jruby/RubyKernel.java:1038
(root) at /home/jjones/Projects/Desktop/test_app/src/manifest.rb:33
require at org/jruby/RubyKernel.java:1038
(root) at src/main.rb:21

$ rake rawr:jar
javac -target 1.6 -cp lib/java/monkeybars-1.1.1.jar:lib/java/jruby-complete.jar:lib/java/miglayout-3.7.3.1.jar:src -sourcepath src -d package/classes/java src/org/rubyforge/rawr/Main.java
Compile src/application_view.rb into package/classes/ruby/application_view.class
compile_dirs has src_dirs = ["src"]
glob_ruby_files has directory 'src' glob ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
files for src: 5
ruby_globs.each has glob_data = #
Go compile ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
Compile src/main.rb into package/classes/ruby/main.class
compile_dirs has src_dirs = ["src"]
glob_ruby_files has directory 'src' glob ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
files for src: 5
ruby_globs.each has glob_data = #
Go compile ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
Compile src/manifest.rb into package/classes/ruby/manifest.class
compile_dirs has src_dirs = ["src"]
glob_ruby_files has directory 'src' glob ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
files for src: 5
ruby_globs.each has glob_data = #
Go compile ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
Compile src/resolver.rb into package/classes/ruby/resolver.class
compile_dirs has src_dirs = ["src"]
glob_ruby_files has directory 'src' glob ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
files for src: 5
ruby_globs.each has glob_data = #
Go compile ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
Compile src/application_controller.rb into package/classes/ruby/application_controller.class
compile_dirs has src_dirs = ["src"]
glob_ruby_files has directory 'src' glob ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
files for src: 5
ruby_globs.each has glob_data = #
Go compile ["src/application_view.rb", "src/main.rb", "src/manifest.rb", "src/resolver.rb", "src/application_controller.rb"]
=== Creating jar file: package/jar/test_app.jar

$ java -jar package/jar/test_app.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 #.(root)(