Errore di motionmigrati 'Moditionmigrate costante non intiliati :: MotionModel (NAMERROR)

StackOverflow https://stackoverflow.com//questions/21066540

  •  26-12-2019
  •  | 
  •  

Domanda

Ho provato a usare Motion_Migrati nella mia app Rubimotion ma continuo a ottenere questo errore quando eseguo Rake.Ho incluso il mio rakefile, Gemfile e il mio file modello per il debug del problema

be rake

*** Terminating app due to uncaught exception 'NameError', reason: 'uninitialized constant MotionMigrate::MotionModel (NameError)'
.

il mio rakefile

$:.unshift("/Library/RubyMotion/lib")

begin
  require 'motion/project/template/ios'
  require 'rubygems'
  require 'bundler'
  Bundler.require
  require 'motion-require'
  require 'motion_migrate'
  Motion::Require.all
rescue LoadError
end

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.

  app.name = 'app'
  app.identifier = 'com.example.authexample'
  app.files = (app.files - Dir.glob('./app/**/*.rb')) + Dir.glob("./lib/**/*.rb") + Dir.glob("./config/**/*.rb") + Dir.glob("./app/**/*.rb")

  app.detect_dependencies = false
  #PODS
  app.pods do
    pod 'SVProgressHUD'
    pod 'SMPageControl'
  end
end
.

ha anche incluso il mio gemfile

source 'https://rubygems.org'

gem 'rake'
# Add your dependencies here:
gem "ProMotion", github: "clearsightstudio/ProMotion", branch: "edge"
gem 'bubble-wrap'
gem 'motion-cocoapods'
gem 'formotion'
gem 'sugarcube', :require => 'sugarcube-all'
gem 'motion-pixate'
gem 'ProMotion-formotion'
gem 'motion-support'
gem 'webstub'
gem 'afmotion'
gem 'motion_migrate'
.

Modello

class User < MotionMigrate::Model
  property :username, :string 
  property :name,     :string 
  property :email,    :string 
end
.

Qualcuno ha qualche idea cosa sto facendo male.

Grazie

È stato utile?

Soluzione

Ho capito qual è il problema, era una questione di dipendenza.Ho sforbo la gemma e ho incluso il movimento del movimento. Questo ha risolto il problema. https://github.com/gomezelom/motion_migrate

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top