For a hybrid app, I'm trying to run a Grunt build to compile (etc.) the web code, as part of the XCode build.
I have a Build Phase run script defined as:
source "$HOME/.rvm/scripts/rvm"
cd "${PROJECT_DIR}/www"
PATH=${PATH}:${HOME}/.rvm/gems/ruby-1.9.3-p327/bin:${HOME}/.rvm/gems/ruby-1.9.3-p327@global/bin:${HOME}/.rvm/rubies/ruby-1.9.3-p327/bin:${HOME}/.rvm/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:${HOME}/.rvm/bin
grunt build
grunt build
works fine from the command line, but through XCode I get the following error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem compass (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /Users/peteshau/.rvm/gems/ruby-1.9.3-p327/bin/compass:18
from /Users/peteshau/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14
(Compass is for compiling the SASS).