From: Duncan Mccaffery Date: 2006-08-25T21:07:28+09:00 Subject: Re: No sleep till cocoa! (works) Paul Battley wrote: > On 25/08/06, Duncan Mccaffery wrote: >> It seems activerecord is redefining the load method in some way. I'm >> fairly new to Ruby and I'm a little stuck. Any ideas? I've already >> tried seperating the above into modules (active record and ruby cocoa >> stuff are in seperate name spaces (I think!) but this doesn't seem to >> work. > > ActiveSupport is the culprit. In dependencies.rb, we find: > > class Object #:nodoc: > def load(file, *extras) > super(file, *extras) > rescue Object => exception > exception.blame_file! file > raise > end > # ... > > RubyCocoa works by responding to method_missing and despatching ObjC > messages via ocm_send; once ActiveSupport has had its evil (don't get > me started!) way, this will never happen. > > You should be able to use this as a quick workaround: > > OSX::NSBundle.bundleWithPath("...snip...").ocm_send(:load) > > Paul. Cheers for that everything is working fantastic! I only wish I'd tried here about a week ago. Thanks, Duncan -- Posted via http://www.ruby-forum.com/.