trouble with gems and .jar file

23 views
Skip to first unread message

Salvador

unread,
Apr 8, 2011, 5:59:59 PM4/8/11
to rawr-lib
I'm getting an error while trying to execute the .jar generated by
rawr. I've unpacked the gem on the 'lib/ruby' dir, and added it to my
local path on the first lines of my main file. The jar created has in
it the json folder, but I keep getting the same message, "Error msg:
'(LoadError) no such file to load -- json'"

I also have a require 'rubygems' sentence on my app. While looking for
a solution to my problem I've read that rawr does not behave well with
it, but if I remove it my app won't start (not the .jar).

I would greatly appreciate any advise I can get, please tell me if you
need some more info.

-Salvador

James Britt

unread,
Apr 8, 2011, 6:46:25 PM4/8/11
to rawr...@googlegroups.com
Salvador wrote:
> I'm getting an error while trying to execute the .jar generated by
> rawr. I've unpacked the gem on the 'lib/ruby' dir, and added it to my
> local path on the first lines of my main file. The jar created has in
> it the json folder, but I keep getting the same message, "Error msg:
> '(LoadError) no such file to load -- json'"
>
> I also have a require 'rubygems' sentence on my app. While looking for
> a solution to my problem I've read that rawr does not behave well with
> it, but if I remove it my app won't start (not the .jar).


If you call 'require "rubygems"' you will change how the application
resolves paths. You need to be sure that all path resolution and file
loading is done relative to the application and under the control of the
application.

A Rawr-packaged app should be self-contained, and relying on rubygems
breaks that.

James

Reply all
Reply to author
Forward
0 new messages