Search code examples
rubyrubymotion

Setting up motion-layouts causes path error


I followed the gem setup instructions for motion-layouts ...super easy. However, the path supplied doesn't work...throws an error in the console. The path is as follows:

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

The files are all in the lib directory, but they are not being loaded. When running rake these are the errors:

 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)

Anyone know what the problem here is?


Solution

  • The code in the question is from a branch of the gem. Its older. I was suspect when I had to clone files from github. The gem is the way to go.