0

升级 ruby​​motion 后出现此错误。

/Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/Anthony/dev/mytrip_ios/Rakefile
/Library/RubyMotion/lib/motion/project/config.rb:26:in `<class:Config>': uninitialized constant Motion::Project::Config::Rake (NameError)
from /Library/RubyMotion/lib/motion/project/config.rb:25:in `<module:Project>'
from /Library/RubyMotion/lib/motion/project/config.rb:24:in `<module:Motion>'
from /Library/RubyMotion/lib/motion/project/config.rb:24:in `<top (required)>'
from /Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Library/RubyMotion/lib/motion/project.rb:26:in `<top (required)>'
from /Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Library/RubyMotion/lib/motion/project/template/ios.rb:29:in `<top (required)>'
from /Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/Anthony/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/Anthony/dev/mytrip_ios/Rakefile:3:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'

Process finished with exit code 1

我的 rake 文件是这样开始的

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require 'rubygems'

我的配置有什么问题?

4

1 回答 1

0

“来自 /Users/Anthony/dev/mytrip_ios/Rakefile:3:in `'”

由于您使用的是 Ruby > 1.9,因此通常不需要 ruby​​gems。

此外,rubymotion 不像常规 ruby​​ 那样处理“require”语句。

如果您有兴趣从标准库加载 ruby​​ 类和扩展,请查看 motion-bundler gem。

于 2013-10-13T17:06:30.317 回答