我正在尝试在一个RubyMotion项目中使用RestKit,事实证明它比预期的要困难得多。
我已经尝试了这里列出的方法https://github.com/rounders/RestKitTest
不幸的是,这会导致错误,看起来像
ERROR! Building vendor project `vendor/RestKit' failed to create at least one `.a' library.我尝试安装RestKit的另一种方法是使用motion-cocoapods,如下所述:http://thunderboltlabs.com/posts/restkit-object-mapping-with-rubymotion.html
下面的Rakefile显示以下错误
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'bundler'
Bundler.require
require './lib/app_properties'
props = AppProperties.new
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = "TestApp"
app.pods do
pod 'RestKit/Network'
pod 'RestKit/UI'
pod 'RestKit/ObjectMapping'
pod 'RestKit/ObjectMapping/JSON'
end
end错误:[!] Unable to find a specification for 'RestKit/Network'.
任何其他经历过这些问题的人都非常感谢。
发布于 2013-05-22 18:16:14
今天我刚刚和Restkit建立了一个项目。只要确保你有像我这样的东西:
我使用Bundler的Rakefile
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require "rubygems"
require 'bundler'
Bundler.require
Motion::Project::App.setup do |app|
app.name = 'AppName'
app.pods do
pod 'RestKit', '0.20.1'
end
end然后我的Gemfile
source "https://rubygems.org"
gem "motion-cocoapods", "~> 1.3.0"
gem "cocoapods", "0.18.1"然后
bundle
rake clean
rm -rf vendor
rake它应该可以工作:-)
https://stackoverflow.com/questions/16409101
复制相似问题