From: James Britt Date: 2010-02-22T06:32:23+09:00 Subject: Re: Including gems in a bundle with Rawr (Jruby) Eric Christopherson wrote: > I'm able to make a jar/.exe/.app out of a simple script with Rawr, but > I can't seem to run one that uses a gem. It complains that it can't > find the gem at runtime. I've read > > and tried to follow the instructions, but without success. Might > anyone be able to help? Is the gem installed on all system were the rawr-packaged app will run? If you are not assured of that then having code that expects a gem is asking for trouble. Also, the instructions on the page you gave has this: "You need to unpack the gem into lib/ruby" The reason for that is so that you do not need to use rubygems to load anything. You should be using 'require ', and all paths should be relative to your app. rubygems messes with the load path, making life difficult for self-contained apps. If you have code that is attempting to load a gem instead of trying to load files out of your bundled app then something is likely wrong. (Note that the example code on that help page never makes use of rubygems. Only plain old 'require'.) Some gems contain code that makes a call to "require 'rubygems'". (There was a previous thread on ruby-talk about how inane this is.) I usually hate to tell people "don't do that" when they ask how do do something, but trying to use rubygems from inside an app packaged up with rawr is just asking for trouble. One of the purposes of rawr is create self-sufficient apps. Grep you code for any reference to rubygems and delete it. :) -- James Britt www.jamesbritt.com - Playing with Better Toys www.ruby-doc.org - Ruby Help & Documentation www.rubystuff.com - The Ruby Store for Ruby Stuff www.neurogami.com - Smart application development