“eval pod install”中的Travis-CI错误

时间:2016-02-03 21:10:11

标签: ios xcode continuous-integration cocoapods travis-ci

我的.travis.yml文件:

language: objective-c

script: 
    xctool -workspace ProjectName.xcworkspace -scheme ProjectName build -sdk iphonesimulator

虽然Travis-CI正在建设该项目,但它说:

$ bundle --version
Bundler version 1.7.4
$ xcodebuild -version -sdk
$ pod --version
0.34.4
Installing Pods with 'pod install'
$ pushd .
~/build/GabrielMassana/ProjectName-iOS
$ pod install

安装pod时,错误是:

The command "eval pod install" failed. Retrying, 2 of 3.
The command "eval pod install" failed. Retrying, 3 of 3.
The command "eval pod install" failed 3 times.
The command "pod install" failed and exited with 1 during .
Your build has been stopped.

1 个答案:

答案 0 :(得分:2)

我发现添加这些行可以解决我的问题。

before_install:
    - rvm use system
    - sudo gem install cocoapods -v '0.39.0'  

所以我的最终.travis.yml文件:

language: objective-c

before_install:
   - rvm use system
   - sudo gem install cocoapods -v '0.39.0'  

script: 
    xctool -workspace ProjectName.xcworkspace -scheme ProjectName build -sdk iphonesimulator

现在cocoapods完成了安装。

可能有些Travis机器设置为使用旧版本(0.34.4)运行

I also wrote a post in my blog about Travis-CI.