-->

包括没有找到模块RubyMotion(Include not finding module Ruby

2019-09-21 10:35发布

在RubyMotion允许混入? 我有两个文件的目录。 一个是一类,其他的模块。 当我包括在我的课模块(混入),我得到一个未找到错误。 在应用程序一切都在正确的RM自动要求?

谢谢你的帮助。

Answer 1:

找到了! http://dylanmarkow.com/blog/2012/05/06/load-order-with-rubymotion/



Answer 2:

我使用的捆扎机,所以我最终把这样的事情在Motion::Project::App.setup do |app| 块:

app_files = app.files.reverse.pop
app.files << Dir.glob(File.join(app.project_dir, 'lib/**/*.rb')) << app_files

肯定是有更好的方式来做到这一点。



文章来源: Include not finding module RubyMotion
标签: rubymotion