From: FUJIMOTO Hisakuni Date: 2003-01-13T14:25:44+09:00 Subject: Re: RubyCocoa Ruby script problems Hi, At Mon, 13 Jan 2003 11:45:24 +0900, Mark Wilson wrote: > After installing RubyCocoa I can run the sample .app files (including > the ones that I build with pbx). But I can't run the Ruby scripts. > For example > > $ ruby sndplay2.rb > /usr/local/lib/ruby/site_ruby/1.8/osx/cocoa.rb:12:in `require': No such > file to load -- osx/objc/cocoa (LoadError) > from /usr/local/lib/ruby/site_ruby/1.8/osx/cocoa.rb:12 > from sndplay.rb:1:in `require' > from sndplay.rb:1 I guess the following: * More than one ruby is installed in your system. * Old RubyCocoa is installed for some ruby(s). * the 'ruby' command is related with the old RubyCocoa. So, the 'ruby' command is related with old RubyCocoaa installed previously instead of new one. If you show the following information, someone can maybe help you. $ which ruby $ ruby -e 'p $:' $ ruby --version $ grep -n 'require' /usr/local/lib/ruby/site_ruby/1.8/osx/cocoa.rb Launch sample/SimpleApp.app, do 'about SimpleApp...', get ruby version. > The following is what happens after I copy the objc directory and its > contents from > > {rubycocoa directory}/framework/src/osx/objc > to > /usr/local/lib/ruby/site_ruby/1.8/osx/ hmm. This is wrong. In RubyCocoa 0.4, every ruby program of the framework must be put in the appropriate place in RubyCocoa.framework. The programs which must be put in the $LOAD_PATH are only some stubs to load the framework from a ordinary ruby script. cheers, -- FUJIMOTO Hisakuni