siuying / NanoStoreInMotion

RubyMotion wrapper for NanoStore, a lightweight schema-less key-value document database based on sqlite.
Other
103 stars 24 forks source link

uninitialized constant error #21

Closed n-studio closed 11 years ago

n-studio commented 11 years ago
uninitialized constant NanoStore::Model::AssociationInstanceMethods (NameError)
Terminating app due to uncaught exception 'NameError', reason: 'uninitialized constant NanoStore::Model::AssociationInstanceMethods (NameError)

Occurs in empty application that just has

require 'nano-store'

and

pod 'NanoStore'

in Rakefile

nano-store works perfectly fine with 0.4.3. It occurs only with 0.5.1

siuying commented 11 years ago

Hi,

Which version of ruby you are using? you can try to type ruby -v on your command line.

n-studio commented 11 years ago

Hi!

ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin12.2.0]

siuying commented 11 years ago

Have you try to run rake clean before rake?

siuying commented 11 years ago

I cannot reproduce this error. I'm also using ruby 1.9.3 so this should not be an issue. Please also use latest version (1.29) of rubymotion which automatically resolve build dependency.

n-studio commented 11 years ago

Ok ! So app.detect_dependencies = false was the cause of the error. Thank you. Unfortunately, app.detect_dependencies = true gives me stack level too deep error.

I guess I can't use 0.5.1 until Rubymotion solves this bug.

siuying commented 11 years ago

@n-studio hmm, i think i can fix that by manually load the association.rb, will commit it soon.

n-studio commented 11 years ago

Thank you!

siuying commented 11 years ago

okay, 0.5.2 is release! Please see if it fixes the issue.

n-studio commented 11 years ago

It seems to work great! Thank you!