Travis-CI 错误 "eval pod install"
Travis-CI error with "eval pod install"
我的 .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
安装 pods 时出现错误:
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.
我发现添加这行可以解决我的问题。
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)
我的 .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
安装 pods 时出现错误:
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.
我发现添加这行可以解决我的问题。
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)