From: Jon B. <jo...@gm...> - 2007-07-10 13:19:13
|
You know what is a good app to check out ... http://infinitenil.com/packrat/ Download it and jump into /Applications/PackRat.app/Contents/ Resources and take a look @ how his "lib" and rb_main.rb are laid out. I found it be pretty helpful, although still not sure if it was all generated by standalonify + if this is the "standard" way to do it. In a nutshell (just remember to load REXML first): COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) $LOAD_PATH.reject! { |d| d.index(File.dirname (COCOA_APP_RESOURCES_DIR))!=0 } $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") $LOADED_FEATURES << "rubycocoa.bundle" ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join (COCOA_APP_RESOURCES_DIR,"RubyGems") HTH, - Jon On Jul 10, 2007, at 9:09 AM, Tim Perrett wrote: > Ok great - sounds good. I know im being dumb here, but I can see how > that would work in general terms, but how does it directly apply > within an RC app? Its was mentioned earlier in this thread about > doing something in the rb_main.rb file? > > The example Jon posted was using -e option on the ruby command, how > do I change my load path within the application? Apologies for what > probably seems like a really newbie question! > > Cheers > > Tim > > > On 10 Jul 2007, at 13:57, Eloy Duran wrote: > >>> REXML is maybe part of the stdlib but it's a pure Ruby library. I >>> would bet copying the necessary .rb files in your app bundle and >>> prefixing your $: with their path will work for you. >> >> Exactamundo! ;) >> >> Eloy > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |