0

我遵循了运动布局的 gem 设置说明……超级简单。但是,提供的路径不起作用...在控制台中引发错误。路径如下:

 app.files.unshift(Dir.glob(File.join(app.project_dir, 'vendor/motion-layouts/lib/**/*.rb')))

这些文件都在 lib 目录中,但它们没有被加载。运行 rake 这些是错误:

 uninitialized constant Motion::Project (NameError)
/blah/blah/blah/vendor/motion-layouts/lib/motion-layouts.rb must be required within a  RubyMotion project Rakefile. (RuntimeError)
2013-04-20 18:58:51.675 SuperCast[81864:c07] *** Terminating app due to uncaught exception 'RuntimeError', reason: '/blah/blah/blah/vendor/motion-layouts/lib/motion-layouts.rb must be required within a RubyMotion project Rakefile. (RuntimeError)

任何人都知道这里的问题是什么?

4

1 回答 1

1

问题中的代码来自 gem 的一个分支。它的旧。当我不得不从 github 克隆文件时,我很怀疑。宝石是要走的路。

于 2013-04-21T03:36:58.853 回答