我成功地安装了cocoapods 0.29,在尝试运行pod安装程序之后,它声称我必须安装0.29。
有人能给我解释一下吗??
Successfully installed cocoapods-0.29.0
Parsing documentation for cocoapods-0.29.0
1 gem installed
bash-3.2$ pod setup
Setting up CocoaPods master repo
Already up-to-date.
[!] The `master` repo requires CocoaPods 0.29.0 -
Update CocoaPods, or checkout the appropriate tag in the repo.更新:
在更新cocoapods之后,我可以运行pod安装程序,但是仍然会出现一些错误,大约0.29没有安装:(而且,在运行pod时,它说我在0.22.3??)
bash-3.2$ sudo gem update cocoapods
Updating installed gems
Nothing to update
bash-3.2$ sudo pod setup
Setting up CocoaPods master repo
Already up-to-date.
Setup completed (read-only access)
bash-3.2$ pod install
Setting up CocoaPods master repo
Already up-to-date.
[!] The `master` repo requires CocoaPods 0.29.0 -
Update CocoaPods, or checkout the appropriate tag in the repo.
/Users/me/.rvm/gems/ruby-2.0.0-p247/gems/claide-0.3.2/lib/claide/command.rb:210:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
bash-3.2$ pod --version
0.22.3发布于 2014-03-11 20:13:18
导航该文件并删除它
/Users/me/.rvm/gems/ruby-2.0.0-p247/gems/claide-0.3.2/lib/claide
然后打开您的终端添加以下内容
sudo创业板更新
它100%对我起作用
发布于 2014-03-06 10:15:25
基于你的评论
$ type -a pod
pod is /Users/me/.rvm/gems/ruby-2.0.0-p247/bin/pod
pod is /Users/me/.rvm/rubies/ruby-2.0.0-p247/bin/pod
pod is /usr/bin/pod看来Cocoapods有多个安装:一个在/Users/me/.rvm/gems/ruby-2.0.0-p247/bin/pod中安装gem install cocoapods,另一个在/usr/bin/pod中安装sudo gem install cocoapods (我不知道/Users/me/.rvm/rubies/ruby-2.0.0-p247/bin/pod是什么)。
因此,运行gem install cocoapods应该通过更新/Users/me/.rvm/gems/ruby-2.0.0-p247/bin/pod中的安装来解决问题。
不过,我建议通过删除全局安装(使用sudo)或删除本地安装(没有sudo)来清除安装。
编辑
这是我的Jenkins安装:
用gem install cocoapods安装Cocoapods。
运行type -a pod产量:
$ type -a pod
pod is /Users/Shared/Jenkins/Home/gems/bin/pod在Jenkins全局配置中,我添加了以下环境变量:
GEM_HOME = $JENKINS_HOME/gems
GEM_PATH = $JENKINS_HOME/gems:/usr/lib/ruby/gems/1.8/
PATH = $PATH:$HOME/gems/bin我在每个项目中添加了一个"Shell脚本“构建步骤:
POD_PROJECT_DIRECTORY='MyProject' # Directory where the Podfile is. Probably the same as Xcode plugin's "Xcode Project Directory".
cd "$WORKSPACE/$POD_PROJECT_DIRECTORY"
# rm -rf ./Pods # Uncomment this line if you want to re-download all the Pods each time
pod install --no-color发布于 2014-03-13 19:04:54
我发现“荚--版本”报道的版本与我更新时看到的内容不一致,这让我感到困惑。然后我意识到我的机器上安装了不止一颗红宝石。我更改了我的$PATH,以便首先使用我需要使用的红宝石(例如/usr/local/opt/ ruby /bin):
在一个新的shell中,我发现'pod‘开始报告我想要的'0.29.0’版本。
https://stackoverflow.com/questions/22219784
复制相似问题