HipByte/RubyMotion — pull request #97 by mgarriott (2013-06-12 17:09:53+00:00)
Title: Fix build expression for Xcode 3.x

With Xcode version 3.2 on my machine I was unable to run rake on a newly created project.

The exact failure was:

rake aborted!
undefined method `[]' for nil:NilClass
/Library/RubyMotion/lib/motion/project/xcode_config.rb:85:in `xcode_version'
/Library/RubyMotion/lib/motion/project/xcode_config.rb:96:in `validate'
/Library/RubyMotion/lib/motion/project/template/ios/config.rb:61:in `validate'
/Library/RubyMotion/lib/motion/project/config.rb:108:in `setup'
/Library/RubyMotion/lib/motion/project/app.rb:64:in `config'
/Library/RubyMotion/lib/motion/project/app.rb:76:in `build'
/Library/RubyMotion/lib/motion/project/template/ios.rb:42:in `block (2 levels) in '

Not having a very friendly error message made this problem much more difficult to resolve. The provided fix allows RubyMotion to retrieve the version number properly. It can then recognize the version as being out of data and print a nice error message.