From: Duncan M. <du...@on...> - 2009-07-21 10:40:03
|
My app VelOCRaptor depends on RubyCocoa, which is shipped with Leopard as a framework version 0.13.1. I don't support Tiger, so have been happy to assume that the framework is installed in /System/Library/ Frameworks Yesterday 2 people found an issue that turns out to be due to another piece of software (for some 3G card AFAICT) installing an older version of the RubyCocoa framework in /Library/Frameworks Is there any way to specify which version of the framework should be loaded when I require 'osx/cocoa'? Thanks in anticipation Duncan McGregor |
From: kimura w. <ki...@us...> - 2009-07-21 23:09:59
|
Hi, Add LSEnvironment into your application's Info.plist and set DYLD_FRAMEWORK_PATH to /System/Library/Frameworks. like this; <key>LSEnvironment</key> <dict> <key>DYLD_FRAMEWORK_PATH</key> <string>/System/Library/Frameworks</string> </dict> This means your app prefers frameworks under /System/Library/Frameworks rather than under other locations. for detail, see the below references. http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/dyld.1.html On Tue, 21 Jul 2009 11:18:20 +0100, Duncan McGregor wrote: > My app VelOCRaptor depends on RubyCocoa, which is shipped with Leopard > as a framework version 0.13.1. I don't support Tiger, so have been > happy to assume that the framework is installed in /System/Library/ > Frameworks > > Yesterday 2 people found an issue that turns out to be due to another > piece of software (for some 3G card AFAICT) installing an older > version of the RubyCocoa framework in /Library/Frameworks > > Is there any way to specify which version of the framework should be > loaded when I require 'osx/cocoa'? > > Thanks in anticipation > > Duncan McGregor > -- kimura wataru |
From: kimura w. <kimuraw@i.nifty.jp> - 2009-07-21 23:14:09
|
Hi, Add LSEnvironment into your application's Info.plist and set DYLD_FRAMEWORK_PATH to /System/Library/Frameworks. like this; <key>LSEnvironment</key> <dict> <key>DYLD_FRAMEWORK_PATH</key> <string>/System/Library/Frameworks</string> </dict> This means your app prefers frameworks under /System/Library/Frameworks rather than under other locations. for detail, see the below references. http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/dyld.1.html On Tue, 21 Jul 2009 11:18:20 +0100, Duncan McGregor wrote: > My app VelOCRaptor depends on RubyCocoa, which is shipped with Leopard > as a framework version 0.13.1. I don't support Tiger, so have been > happy to assume that the framework is installed in /System/Library/ > Frameworks > > Yesterday 2 people found an issue that turns out to be due to another > piece of software (for some 3G card AFAICT) installing an older > version of the RubyCocoa framework in /Library/Frameworks > > Is there any way to specify which version of the framework should be > loaded when I require 'osx/cocoa'? > > Thanks in anticipation > > Duncan McGregor > -- kimura wataru |
From: Duncan M. <du...@on...> - 2009-07-21 23:46:38
|
On 22 Jul 2009, at 00:01, kimura wataru wrote: > Hi, > > Add LSEnvironment into your application's Info.plist and > set DYLD_FRAMEWORK_PATH to /System/Library/Frameworks. > like this; > > <key>LSEnvironment</key> > <dict> > <key>DYLD_FRAMEWORK_PATH</key> > <string>/System/Library/Frameworks</string> > </dict> > > This means your app prefers frameworks under /System/Library/ > Frameworks > rather than under other locations. > > for detail, see the below references. > > http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html > http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html > http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/dyld.1.html Thank you very much. A slight problem is that I am using RubyCocoa directly from a .rb script not an app bundle and so don't have an Info.plist, but I'm sure that I can set the equivalent environment variables before I invoke the script. Thanks again Duncan |
From: Duncan M. <du...@on...> - 2009-07-22 07:58:41
|
Just a heads up for posterity. AT&T are shipping a 3G modem card that overrides the installed version of RubyCocoa. With VelOCRaptor the symptoms are an exception thrown when I attempt to call new on an NSClass /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ oc_import.rb:251:in `new': use 'alloc.initXXX' to instantiate Cocoa Object (RuntimeError) The frameworks they are installing are RubyCocoa: Version: 0.12.0 Last Modified: 6/29/09 11:01 PM Get Info String: RubyCocoa 0.12.0 Copyright (c) 2002 FUJIMOTO Hisakuni. Location: /Library/Frameworks/RubyCocoa.framework Private: No NMGsmKit: Version: 0.2.0 Last Modified: 6/29/09 11:01 PM Location: /Library/Frameworks/NMGsmKit.framework Private: No NML2NManager: Version: 0.3.0 Last Modified: 6/29/09 11:01 PM Location: /Library/Frameworks/NML2NManager.framework Private: No NMNetCore: Version: 0.6.0 Last Modified: 6/29/09 11:01 PM Location: /Library/Frameworks/NMNetCore.framework Private: No NMNetWorker: Version: 0.2.0 Last Modified: 6/29/09 11:01 PM Location: /Library/Frameworks/NMNetWorker.framework Private: No NMRegistrationCore: Version: 0.3.0 Last Modified: 6/29/09 11:01 PM Location: /Library/Frameworks/NMRegistrationCore.framework Private: No On Kimura Wataru's excellent advice, I am looking at setting DYLD_FRAMEWORK_PATH or maybe DYLD_FALLBACK_FRAMEWORK_PATH to solve this problem, but as I can't reproduce it here yet, I am unable to report whether or not this works. Duncan McGregor www.velOCRaptor.com Simple Affordable Mac OCR |