From: Allison N. <dem...@ma...> - 2008-06-16 13:34:19
|
Hi Stephyn, Can you tell us a little more about your current system? Did you install RubyCocoa from source, or as a binary? Do you play around with the source code for Ruby itself (and hence wish to have a bleeding edge installation), or are you looking simply for a stable release? If you just want to have a stable release of ruby, I would suggest simply using the ruby that comes installed by default with Leopard. Delete any gems, and any ruby binaries that are in your /usr/local/bin (ruby, rdoc, ri, erb, irb, and maybe others that I've forgotten). Reinstall using your standard Leopard ruby. That's the simplest solution for having one, and only one, ruby installation on your computer that can do everything. If you want to do something special, you're going to have to I think (and maybe someone else can confirm this), you're going to have to modify the source code of RubyCocoa. As it stands, it seems to me that RubyCocoa compiles explicitly against the standard ruby installed with Leopard, and you will probably have to make changes to the source code to change that. Hope that helps. Alli On Saturday, June 14, 2008, at 01:39AM, "Stephyn Butcher" <ste...@co...> wrote: >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. > >------------------------------------------------------------------------- >Check out the new SourceForge.net Marketplace. >It's the best place to buy or sell services for >just about anything Open Source. >http://sourceforge.net/services/buy/index.php >_______________________________________________ >Rubycocoa-talk mailing list >Rub...@li... >https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |