From: Aaron Patterson Date: 2009-10-20T06:17:42+09:00 Subject: [ruby-core:26170] Re: RbConfig::...[prefix] not sensible on OS X 10.5? Joshua ben Jore wrote: > Today, I found this points to a nonsensical location. > > require 'rbconfig' > ruby = File.join( > RbConfig::CONFIG['prefix'], > RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT'] ) > system "#{ruby} -e 1" > > prefix is /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr > but should be /usr/bin. The interpreter needs a way to find itself > without trusting $PATH because there are multiple interpreters on the > same machine. > > Or... is it sensible to stash the original C argv[0] somewhere? Right > now we seem to ignore it. I think the "prefix" is correct. Did you mean "bindir": ruby = File.join( RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT'] ) puts ruby -- Aaron Patterson http://tenderlovemaking.com/