From: Eloy D. <elo...@gm...> - 2009-07-29 03:56:54
|
Hi, What I generally do is: * Create a vendor/gems directory * Unpack the gems into that directory * Add the directory to your xcode project as a folder reference (this means xcode will copy the dir and its contents to the Resources dir * Add the gem dirs to the load path. For instance something like this in rb_main.rb: Dir.glob("#{File.join(NSBundle.mainBundle.resourcesPath, 'vendor/gems')}/*").each do |gem| $:.unshift gem require gem end (Note that I just wrote this down and might contain slight errors.) HTH, Eloy On Wed, Jul 29, 2009 at 12:25 PM, Ferlander Davids<fer...@gm...> wrote: > I'm building an application with the intent of distributing it to people > that won't have rubycocoa installed. I believe I've successfully included > the rubycocoa framework and the ruby runtime library, however I still need > to include one or two gems before I'm done. > I read: > http://rubycocoa.sourceforge.net/EmbedRubyCocoa > I tried standaloneify.rb, but as far as I could tell it broke my > application. > Is there a simple way to include ruby gems? I thought maybe I could store > them in Resources, but xcode doesn't seem to like it when I do that. I read > that you can specify the path to modules, but does anyone have any > suggestions as to the right way to get the gems included in the > application? > I hope this is an appropriate question. I'm inexperienced. > Ferlander > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |