gpt4 book ai didi

ruby - 如何为 Xcode 项目升级 Circle CI 2.0 上的 ruby​​ 版本?

转载 作者:数据小太阳 更新时间:2023-10-29 08:56:24 24 4
gpt4 key购买 nike

我安装了 config.yml 和 .ruby-version 来升级 ruby​​。

但我收到一条错误消息 unknown Ruby: ruby​​-2.6.2

用的是ruby-2.3,没有问题。

如何使用 config.yml 设置 ruby​​ 2.6.2?

config.yml

defaults: &defaults
macos:
xcode: "10.0"
shell: /bin/bash --login -eo pipefail
aliases:
- &prepare
|
git submodule update --init --recursive
gem install bundler
bundle install
- &filter-only-master
branches:
only:
- master

version: 2
jobs:
ios:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:ios
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
macos:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:macos
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
facebook_utils:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:facebook_utils:ios
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
twitter_utils:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:twitter_utils:ios
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: build/reports
parseui:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:parseui:all
deployment:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: |
xcrun simctl create "Apple TV 1080p" com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p com.apple.CoreSimulator.SimRuntime.tvOS-11-0
bundle exec rake package:release
jazzy:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: ./Scripts/jazzy.sh
carthage:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:carthage
cocoapods:
<<: *defaults
steps:
- checkout
- run: *prepare
- run: bundle exec rake test:cocoapods

workflows:
version: 2
pr:
jobs:
- ios
- macos
- facebook_utils
- twitter_utils
- parseui
- jazzy
nightly:
jobs:
- deployment
- cocoapods:
requires:
- deployment
- carthage:
requires:
- deployment
triggers:
- schedule:
cron: "0 1 * * *"
filters: *filter-only-master

.ruby 版本

ruby-2.6.2

我在下面收到一条错误消息

#!/bin/bash --login -eo pipefail
git submodule update --init --recursive
gem install bundler
bundle install
^D^Dchruby: unknown Ruby: ruby-2.6.2
Exited with code 1

最佳答案

在 CircleCI 2.0 中,您需要检查为您正在构建的特定 macOS container image 安装了哪些 ruby​​ 版本。

Our macOS containers contain multiple versions of Ruby. The default version is the system-installed Ruby. The containers also include the latest stable versions of Ruby at the time that the container is built. We determine the stable versions of Ruby using the Ruby-Lang.org downloads page. The version of Ruby that are installed in each image are listed in the software manifests of each container. https://circleci.com/docs/2.0/testing-ios/#using-custom-ruby-versions

由于您是在 Xcode 10 中构建。macOS 容器镜像 10.0.0: Xcode 10.0 (Build 10A255) ,ruby 版本 2.3.7、2.4.4、2.5.1 可用于 chruby。

关于ruby - 如何为 Xcode 项目升级 Circle CI 2.0 上的 ruby​​ 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55859198/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com