[MacRuby] #692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks --------------------------------+------------------------------------------- Reporter: mike@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- I have embedded MacRuby in my app using the macruby_deploy script, but it still tries to load library files from /Library/Frameworks. In the case of C extensions, this actually caused libmacruby.dylib to be loaded twice, which is bad. I worked around this by changing the RUBY_LIB before initializing MacRuby. Shouldn't MacRuby set up it's path relative to the framework from which it is loaded? -- Ticket URL: <http://www.macruby.org/trac/ticket/692> MacRuby <http://macruby.org/>
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks --------------------------------+------------------------------------------- Reporter: mike@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by lsansonetti@…): As recommended in the tutorial, the following lines can be added in rb_main.rb: {{{ $:.map! { |x| x.sub(/^\/Library\/Frameworks/, NSBundle.mainBundle.privateFrameworksPath) } $:.unshift NSBundle.mainBundle.resourcePath.fileSystemRepresentation }}} However, as you say, it makes sense for MacRuby to set up its load path relative to where MacRuby.framework was loaded. We will address that problem. Just to be sure, we are talking about Ruby files here? In theory all binary files should be re-linked to point to the copy of MacRuby.framework inside the .app. -- Ticket URL: <http://www.macruby.org/trac/ticket/692#comment:1> MacRuby <http://macruby.org/>
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks --------------------------------+------------------------------------------- Reporter: mike@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by mike@…): That's correct, ruby files only. The Mach-O binaries are correctly modified to be relative to the loader. Thanks! -- Ticket URL: <http://www.macruby.org/trac/ticket/692#comment:2> MacRuby <http://macruby.org/>
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks --------------------------------+------------------------------------------- Reporter: mike@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: This should be fixed in r4038. macruby_main() will automatically relocate the load paths if MacRuby.framework is present inside the current bundle's frameworks directory. -- Ticket URL: <http://www.macruby.org/trac/ticket/692#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby