2013-05-06 44 views
1

我想在RubyMotion項目中使用RestKit,它證明比預期的要困難得多。RubyMotion和RestKit安裝

我試圖在這裏列出https://github.com/rounders/RestKitTest

可惜的辦法,本文吐出和錯誤,看起來像

ERROR! Building vendor project `vendor/RestKit' failed to create at least one `.a' library. 

我曾經嘗試用運動的CocoaPods作爲安裝RestKit另一種方法具體說明如下: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'.

其他人誰也通過這些問題去幫助是極大的讚賞

+0

也許試試看'pod'RestKit''(離開'/ Network'等)? – 2013-05-07 05:59:17

+0

不幸的是,我已經給了它一個去,它不想工作。 :-( – 2013-05-07 09:37:25

回答

2

我剛剛成立了Restkit項目今天。只要確保你有像我:

我的Rake文件,它使用捆紮機

# -*- 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 

它應該工作:-)