MotionMigrate错误'未初始化的常量MotionMigrate :: MotionModel(NameError)

时间:2014-01-11 18:59:40

标签: ios rubygems rubymotion

我尝试在我的rubymotion应用程序中使用motion_migrate,但是当我运行rake时,我一直收到此错误。我已经包含了我的rakefile,gemfile和我的模型文件来帮助调试问题

be rake

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

我的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

还包括我的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'

模型

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

任何人都知道自己做错了什么。

由于

1 个答案:

答案 0 :(得分:0)

我弄清楚问题是什么,这是一个依赖问题。我分叉了宝石并包含了运动要求。 这解决了这个问题。 https://github.com/gomezelom/motion_migrate