From: Eloy D. <e....@su...> - 2008-02-04 12:44:54
|
After you've added the copy files build phase, you'll need to drag RubyCocoa.framework into that "copy files build phase" too. However, if your app works with the default Leopard RubyCococa and you're only targeting Leopard, then I would not bundle it but rather fix your load path problem. So if you look at the rb_,main.rb file of your standaloneified bundle, at the top you'll see some code that was added by Standaloneify. Underneath that do something like: $LOAD_PATH.unshift("/Library/Ruby/Site/1.8") Then you should probably be able to do: require 'osx/cocoa' Cheers, Eloy On 4 feb 2008, at 10:28, Rich Warren wrote: > Ok, I tried to bundle the RubyCocoa framework, but Xcode won't seem to > let me. > > I added a new copy files build phase. > I set the destination to "Frameworks". > I then added an existing framework, and selected RubyCocoa > > The "Add" button is highlighted. But pressing it doesn't seem to do > anything. > > Clearly I'm doing something wrong here. How do I bundle RubyCocoa into > my app? > > -Rich- > > On Feb 3, 2008, at 10:54 PM, Eloy Duran wrote: > >> Hi Rich, >> >> It's true that andy Leopard install will have RubyCocoa installed. >> However iirc standaloneify will completely empty your load path >> before starting the application. >> This means that unless you've bundled the framework it won't be >> found. >> So my guess is that you haven't bundled the framework inside your >> app, >> which is ok of course, but in wich case you'll have to edit your >> rb_main.rb >> file after it has been standalonified to setup the correct load path >> or maybe >> even better; instead of doing "require 'osx/cocoa'" try to specify >> the >> full path. >> >> Cheers, >> Eloy >> >> On 4 feb 2008, at 02:12, Rich Warren wrote: >> >>> Hi, >>> >>> I'm trying to embed some RubyGem libraries into a stand alone app. >>> According to the web site, I used the following command: >>> >>> ruby standaloneify.rb -d RubyRSS_StandAlone.app RubyRSS.app >>> >>> Everything seemed fine. But when I tried to run the stand alone app, >>> It fails to launch. I get the following message in the console: >>> >>> 2/3/08 3:03:57 PM >>> [0x0 >>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278] / >>> Users/rikiwarren/Desktop/RubyRSS_StandAlone.app/Contents/Resources/ >>> rb_main.rb:25:in `require': no such file to load -- osx/cocoa >>> (LoadError) >>> >>> 2/3/08 3:03:57 PM >>> [0x0-0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278] >>> from /Users/rikiwarren/Desktop/RubyRSS_StandAlone.app/Contents/ >>> Resources/rb_main.rb:25 >>> >>> 2/3/08 3:03:57 PM com.apple.launchd[63] >>> ([0x0 >>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278]) >>> Exited with exit code: 1 >>> >>> If I'm reading this right, it's having trouble finding the osx/cocoa >>> library. However, since I'm working on Leopard, all Leopard machines >>> should have osx/cocoa installed by default, right? >>> >>> Am I doing something wrong? How do I get standaloneify to work on >>> Leopard? >>> >>> Thanks, >>> >>> -Rich- >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |