Welcome!
>
> I've mainly followed instructions in the book "Using JRuby" but
> unfortunately the book just runs the app from netbeans - and from
> there my app also works.
Explaining how to create and run a Monkeybars app from Netbeans is
useful, but if the book does not go on to explain how to distribute and
run that same app *outside* of Netbeans then it's a serious omission.
It's been a long time since I've run Monkeybars from Netbeans; I've been
doing pretty much everything from the command line and vim. (When I
need to use Netbeans for any complex UI stuff I use it to design the UI
then go call it from the command line.) Just works better for me.
>
> I want to use the gem "Celerity" in my app, so I've extracted it using
>> jruby -S gem unpack and added it to the ruby/lib dir. The jar package
> created by >jruby -S rake rawr:jar does not run out of the box, as the
> jar does not contain any files in the ruby folder (I guess the
> compiled ruby files from celerity should go there).
Does your build_confiuration.rb file indicate that files should be
pulled in from `ruby/lib` ?
E.g.
c.source_dirs = %w{src lib/ruby }
>
> As I did not find the celerity files in the generated jar I searched
> for them in the lib directory. But there is only the java folder
> containing all java libs. Adding the extracted celerity gem here makes
> the jar work fine.
>
> For me it does not really matter where celerity is placed, but I would
> have expected that rawr:jar does include the ruby libs
> automatically...
Only if you tell it where to look. By default it looks in src/.
The build_configuration.rb file should have comments indicating the
default values.
For example, one of my recent apps has this:
# A list of directories where source files reside
# default value: %w{src }
c.source_dirs = %w{src lib/ruby }
I had to explicitly define `c.source_dirs` to include `lib/ruby`.
James
--
jamesbritt.com - Playing with Better Toys
neurogami.com - Smart application development
azhackers.com - Feed your head. Hack your world.
Ah, but every default monkeybars app has at least two jar files that
have to be included: jruby-complete.jar, and monkeybars-*.jar.
Their default location is therefore included by default.
And there's the default inclusion of ruby files under src/
There's no reason to think every app would need or have ruby libs other
than the application source, so it isn't included by default.
>
> Thx a lot!
My pleasure.