对于混合应用程序,我正在尝试运行 Grunt 构建来编译(等)Web 代码,作为 XCode 构建的一部分。
我有一个构建阶段运行脚本定义为:
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
从命令行工作正常,但通过 XCode 我得到以下错误:
/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
(指南针用于编译 SASS)。