From: Rolando Abarca Date: 2008-12-19T22:48:43+09:00 Subject: [ruby-core:20701] Re: best way to handle $: when embedding ruby On Dec 19, 2008, at 5:26 AM, Nobuyoshi Nakada wrote: > Hi, > > Is iPhone also Darwin? I don't know how it differs from OS X, > now ruby 1.8 is pre-installed in /usr on OS X 10.5. Yes, iPhone is also Darwin, but Apple has not bundled ruby :-( >> I'm concerned on how the $: global variable will be filled though, >> because AFAIK it is created with compile-time static strings that >> will >> not reflect the real directories in my app. So far, this is what I'm >> doing: >> >> void init_ruby_stuff() { >> ruby_init(); >> >> NSString *rubydir = [[NSBundle mainBundle] pathForResource:@"lib" >> ofType:nil inDirectory:@"ruby"]; > > How can you get that directory in C? Mmm... not really sure. mainBundle is my App home (which is usually something like /Users//) > -- > Nobu Nakada regards, -- Rolando Abarca M.