From: Rich W. <rw...@gm...> - 2008-02-06 09:27:54
|
Hmm. That didn't work. I added $LOAD_PATH << "/System/Library/Frameworks/RubyCocoa.framework/Versions/ Current/Resources/ruby" And it now seems to find the osx/cocoa library, but it still crashes when trying to load RubyGem libraries. 2/5/08 9:41:26 PM [0x0-0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[346] / Users/rikiwarren/Desktop/StandAloneRubyRSS.app/Contents/Resources/ ThirdParty/rubygems.rb:280:in `insert': no implicit conversion from nil to integer (TypeError) I don't have time to try and debug this more right now. If you have any ideas, I'd love to hear them. Otherwise, I'll try to poke at it more later, and let you know what I find. -Rich- On Feb 4, 2008, at 2:44 AM, Eloy Duran wrote: > 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 > > > ------------------------------------------------------------------------- > 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 |