2012-06-02 22 views
1

我剛剛開始玩弄Ruby Motion(v 1.9),並且在我的項目中遇到了一些麻煩,包括BubbleWrap(v 0.2.1)。RubyMotion with BubbleWrap

我的Rake文件看起來像:

$:.unshift("/Library/RubyMotion/lib") 
require 'motion/project' 
require 'rubygems' 
require 'bubble-wrap' 

Motion::Project::App.setup do |app| 
    # Use `rake config' to see complete project settings. 
    app.name = "Hello" 
    app.device_family = :ipad #[:ipad,:iphone] 

    app.files += Dir.glob(File.join(app.project_dir, 'vendor/BubbleWrap/lib/**/*.rb')) 
end 

我也只要使用

試圖要求「泡沫包裝」

,但我始終弄,看起來像這樣的錯誤:

ERROR! Can't resolve dependency `/Library/Ruby/Gems/1.8/gems/bubble-wrap 
0.2.1/lib/pollute.rb' because ./Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/pollute.rb 
is not in ["./app/app_delegate.rb", 
"./app/login_controller.rb", "/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/app.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/gestures.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/http.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/json.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/kernel.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/ns_index_path.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/ns_notification_center.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/ns_user_defaults.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/ui_button.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/ui_view_controller.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap/version.rb", 
"/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/pollute.rb"] 

RubyMotion的較新版本不適用於BubbleWrap嗎?

+0

我不爲你提供了一個解決方案,但是我成功使用了Rubymotion 1.9與Ruby 1.9.3p125(通過RVM)搭配使用Bubblewrap 0.2.1。也許它與使用OSX 1.8系統Ruby有關? –

回答

3

UPDATE:這是固定的泡沫包裝0.3.1

這是bubble-wrap寶石中的一個錯誤,它試圖在前面加上寶石的一個./路徑。我打開了一個pull request

現在,您可以使用類似RVM或rbenv安裝Ruby的單獨副本並使用,也可以手動改變行14這個補丁/Library/Ruby/Gems/1.8/gems/bubble-wrap-0.2.1/lib/bubble-wrap.rb

path = /^\.|\/Users\/|\/Library\/Ruby\/Gems\//.match(x) ? x : File.join('.', x)