clayallsopp / motion-require

Dependency management for RubyMotion, using a pseudo `require`
MIT License
34 stars 5 forks source link

undefined method `motion_require' #13

Closed sohocoke closed 10 years ago

sohocoke commented 10 years ago

With the latest version of RubyMotion (v2.14), at runtime an error is thrown when motion_require is used.

Build / run output:

[user@machine:~/src/motion-app]$ rake
     Build ./build/MacOSX-10.8-Development
     Build vendor/NSFileManager_DirectoryLocations
   Compile /Users/user/src/motion-app/.motion-bundler.rb
   Compile /Users/user/src/motion-app/app/legacy/window_controllers.rb
      Link ./build/MacOSX-10.8-Development/motion-app.app/Contents/MacOS/motion-app
    Create ./build/MacOSX-10.8-Development/motion-app.app/Contents/PkgInfo
    Create ./build/MacOSX-10.8-Development/motion-app.app/Contents/Info.plist
    Create ./build/MacOSX-10.8-Development/motion-app.dSYM
       Run ./build/MacOSX-10.8-Development/motion-app.app/Contents/MacOS/motion-app
2013-11-19 17:00:45.913 motion-app[76790:707] undefined method `motion_require' for main:TopLevel (NoMethodError)
2013-11-19 17:00:45.917 motion-app[76790:707] *** Terminating app due to uncaught exception 'NoMethodError', reason: 'undefined method `motion_require' for main:TopLevel (NoMethodError)
'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8f525b06 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff868703f0 objc_exception_throw + 43
    2   motion-app                     0x0000000104ecfd4e _ZL10__vm_raisev + 334
    3   motion-app                     0x0000000104ecfdf4 rb_vm_raise + 148
    4   motion-app                     0x0000000104dfe039 rb_exc_raise + 9
    5   motion-app                     0x0000000104ecdd8d rb_vm_method_missing + 477
    6   motion-app                     0x0000000104ea2c91 rb_vm_dispatch + 3953
    7   motion-app                     0x0000000104ea1b46 rb_vm_trigger_method_missing + 710
    8   motion-app                     0x0000000104ea271f rb_vm_dispatch + 2559
    9   motion-app                     0x0000000104ab99ca vm_dispatch + 1210
    10  motion-app                     0x0000000104abf98e rb_scope + 110
    11  motion-app                     0x0000000104ac2e82 MREP_F29ADA449A5A44B599450659421B7CC4 + 3554
    12  motion-app                     0x00000001049df8c2 RubyMotionInit + 466
    13  motion-app                     0x00000001049dfdbf main + 79
    14  libdyld.dylib                       0x00007fff8a4fe7e1 start + 0
)
libc++abi.dylib: terminate called throwing an exception
(main)> 

Rakefile:

…
require 'rubygems'
require 'bundler'
Bundler.require

# motion-require
require 'motion-require'
Motion::Require.all
…

Gemfile:

gem 'motion-require'
clayallsopp commented 10 years ago

hm motion-require hasn't been tested on OS X, so not sure if it works. feel free to fork and submit a PR if you want to investigate more!

colinta commented 10 years ago

FWIW, I am able to use MotionRequire in OS X.

sohocoke commented 10 years ago

Confirmed to work with latest version of gem. Thanks!