1

I created a new RubyMotion project using:

motion create NewMotion

Then I installed related bundles:

bundle install

Now whenever I run the app I'm getting an error:

➜  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)

Please note that I'm using Ruby ruby 2.0.0p353.

Any help would be highly appreciated.

Cheers

Eki Eqbal
  • 5,779
  • 9
  • 47
  • 81

1 Answers1

6

Ok seems I got how I solve this problem:

  • Install Xcode from the developer.apple.com
  • Point xcode-select to the Xcode Developer Directory

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Eki Eqbal
  • 5,779
  • 9
  • 47
  • 81
  • Another solution is installing it through the App Store, Xcode is required for using RubyMotion, but you don't have to actually use it, you just need it for its command line tools that RubyMotion uses. :) – FluffyJack May 08 '14 at 15:44