In xcode I have a 'run script' build phase that runs a ruby script. However, it seems that xcode is trying to run it using the default mac 1.8 version of ruby rather than the latest version. Given that the script requires a gem, it's failing with a require error and the path in the error points to
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/
Obviously the 1.8 in that path is making me suspicious.
If I open up terminal and run the command ruby -v
then it correctly returns 2.0.0p0
which I installed and set as default using RVM.
How might I get Xcode to look in the right place? Or am I mis-interpreting this error?
Update:
To give a little more info, here is the exact error that the compiler is throwing:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- json (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Volumes/Macintosh HD/Documents/Projects/WesternMusicElements/WesternMusicElements/Ruby/NoteCollectionParser.rb:9
Command /bin/sh failed with exit code 1