I'm preparing my app for Yosemite which has removed Ruby 1.87 which my app relies on. I have copied the Ruby.framework from a Mountain Lion instance and put it into my app and added it into Copy Files.
I then ran:
install_name_tool -id @executable_path/../Frameworks/Ruby.framework/Ruby Ruby.framework/Ruby
which successfully changed the embedded framework to look at the correct Ruby. This all worked fine with the C extensions I was using.
But I'm also calling ruby with an NSTask and I use the full path to xxxx/Ruby.framework/Versions/1.8/usr/bin/ruby within my private framework - however when I try
otool -L xxxx/Ruby.framework/Versions/1.8/usr/bin/ruby
it still shows:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib
How do I go about changing this - I've seen the -change argument for install_name_tool and I think this is what I need but nothing seems to change the otool output.