uninitialized constant Motion :: Project :: Config :: Rake

时间:2013-09-26 15:52:29

标签: rubymine rubymotion

升级rubymotion后我收到此错误。

/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'

我的配置有什么问题?

1 个答案:

答案 0 :(得分:0)

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

因为你正在使用Ruby&gt; 1.9,一般不需要rubygems。

此外,rubymotion不处理常规ruby之类的'require'语句。

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