首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RubyMotion错误:工具“xcodebuild”需要Xcode

RubyMotion错误:工具“xcodebuild”需要Xcode
EN

Stack Overflow用户
提问于 2014-05-07 13:57:51
回答 1查看 1.9K关注 0票数 1

我使用以下方法创建了一个新的RubyMotion项目:

代码语言:javascript
复制
motion create NewMotion

然后我安装了相关的包:

代码语言:javascript
复制
bundle install

现在,每当我运行该应用程序时,我都会得到一个错误:

代码语言:javascript
复制
➜  NewMotion  rake
/Users/info/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local in PATH, mode 040777
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/Library/RubyMotion/lib/motion/project/xcode_config.rb:87:in `xcode_version'
/Library/RubyMotion/lib/motion/project/xcode_config.rb:99:in `validate'
/Library/RubyMotion/lib/motion/project/template/ios/config.rb:85:in `validate'
/Library/RubyMotion/lib/motion/project/config.rb:115:in `setup'
/Library/RubyMotion/lib/motion/project/app.rb:66:in `config'
/Library/RubyMotion/lib/motion/project/template/ios.rb:81:in `block in <top (required)>'
/Users/info/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/info/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => default => simulator
(See full trace by running task with --trace)

请注意,我使用的是Rubyruby2.0.0p353。

任何帮助都将不胜感激。

干杯

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-07 14:04:33

好吧,看来我知道我是怎么解决这个问题的:

  • 从developer.apple.com安装Xcode
  • 点Xcode -选择Xcode开发人员目录 sudo选择-switch /Applications/Xcode.app/Contents/Developer
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23519883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档