【发布时间】:2013-10-10 15:23:47
【问题描述】:
我正在尝试根据 tutorial 将 cocoapods 集成到 rubymotion 中,但是,当我运行 rake 时出现错误:
You have already activated i18n 0.6.5, but your Gemfile requires i18n 0.6.1. Using bundle exec may solve this.
我该怎么办,我尝试在 Gemfile 中指定 gem 版本,但没有帮助。这是我Rakefile中的代码。
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require 'rubygems'
require 'motion-cocoapods'
# if you use bundler
require 'bundler'
Bundler.require
# if you are not using bundler
# require 'rubygems'
# require 'ib'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'IBSample'
app.pods do
platform :ios, '6.0'
pod 'SWRevealViewController', '~> 1.0.5'
end
end
更新:这里是 gemfile
# A sample Gemfile
source "https://rubygems.org"
gem "ib"
gem "rake"
# gem "i18n", "0.6.1"
当我运行 bundle exec rake 时,我得到了
cannot load such file -- motion-cocoapods
请注意,我已经安装了 motion-cocoapods 并检查了它是否在我的 gem 列表中。
【问题讨论】:
-
您也可以发布 Gemfile 吗?您是否尝试过在命令前加上
bundle exec?例如bundle exec rake -
@FluffyJack bundle exec 给出:无法加载这样的文件——motion-cocoapods
-
尝试更新您的 rubygems
gem update --system。还有你用的是什么版本的红宝石? -
@FluffyJack
gem update --system没有修复它,我在这个项目中使用ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.0],但我也使用 2.0 和我的 rails -
复制这一切,看看会发生什么。
标签: rubymotion cocoapods