From: Stephyn B. <ste...@co...> - 2008-06-13 23:39:36
|
I apologize if this has been covered. I tried to go through the archives up until the release of Leopard but I didn't see anything that that specifically addressed this issue. I was running a simple code example from a book: require 'osx/cocoa' include OSX class AppDelegate < NSObject def applicationDidFinishLaunching( aNotification) puts "#{aNotification.name} makes me say: Hello, world!" end end NSApplication.sharedApplication NSApp.setDelegate( AppDelegate.alloc.init) NSApp.run and because I've quite successfully run RubyCocoa apps, I was quite surprised to see the following error: $ ruby basic.rb 2008-06-13 19:24:05.049 ruby[38469:10b] WARNING: multiple libruby.dylib found: '/usr/local/lib/libruby.dylib' and '/System/ Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib' 2008-06-13 19:24:05.055 ruby[38469:10b] RBCocoaInstallRubyThreadSchedulerHooks: warning: rb_set_cocoa_thread_hooks is linked from a different library (/System/ Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby. 1.dylib) than ruby_init (/usr/local/lib/libruby.dylib) Segmentation fault $ now if I run using the ruby that exists in /System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/bin/, I get: $ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby basic.rb NSApplicationDidFinishLaunchingNotification makes me say: Hello, world! which is the expected behavior. The basic question is, is there a way to fix this without running two versions of ruby? And by fix, this means having all of my installed gems accessible, being able to do just regular command line ruby, is the /System/Library/.../bin/ruby free of the problem that the version in Tiger had (which I even forget what it was...something about mySQL comes to mind)? Is there any reason to keep up two parallel installations of ruby 1.8.6 and what are the ramifications of picking one installation over the other? Or is the result of not having compiled with the shared library option? (Sorry, I came to programming in the Java Age, if configure, make, make install doesn't do it, I'm completely lost). Any help would be appreciated. |