在CircleCI上使用fastlane安装gemfile时出错

问题描述 投票:0回答:2

我有以下gemfile:

source "https://rubygems.org"

gem "cocoapods", "=1.5.3"
gem "cocoapods-check", "=1.1.0"
gem "fastlane", "~> 2.131"

以及CircleCI上管道的以下部分:

- run:
          name: Install Gemfile for Fastlane
          command: bundle check || bundle install --path vendor/bundle

然后产生此输出:

#!/bin/bash --login -o pipefail
bundle check || bundle install --path vendor/bundle
^D^DThe following gems are missing
 * minitest (5.12.0)
 * babosa (1.0.3)
 * cocoapods-core (1.5.3)
 * fourflusher (2.0.1)
 * cocoapods (1.5.3)
 * cocoapods-check (1.1.0)
 * excon (0.67.0)
 * json (2.2.0)
 * rubyzip (1.3.0)
Install missing gems with `bundle install`
Fetching gem metadata from https://rubygems.org/........
Using CFPropertyList 3.0.1
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using minitest 5.12.0
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11.1
Fetching public_suffix 2.0.5
Installing public_suffix 2.0.5
Fetching addressable 2.7.0
Installing addressable 2.7.0
Using atomos 0.1.3
Fetching babosa 1.0.3
Installing babosa 1.0.3
Using bundler 2.0.2
Using claide 1.0.3
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using cocoapods-core 1.5.3
Using cocoapods-deintegrate 1.0.4
Using cocoapods-downloader 1.2.2
Using cocoapods-plugins 1.0.0
Using cocoapods-search 1.0.0
Using cocoapods-stats 1.1.0
Using netrc 0.11.0
Using cocoapods-trunk 1.4.0
Using cocoapods-try 1.1.0
Using colored2 3.1.2
Using escape 0.0.4
Using fourflusher 2.0.1
Using gh_inspector 1.1.3
Using molinillo 0.6.6
Using ruby-macho 1.4.0
Using nanaimo 0.2.6
Using xcodeproj 1.12.0
Using cocoapods 1.5.3
Using cocoapods-check 1.1.0
Fetching colored 1.2
Installing colored 1.2
Fetching highline 1.7.10
Installing highline 1.7.10
Fetching commander-fastlane 4.4.6
Installing commander-fastlane 4.4.6
Fetching declarative 0.0.10
Installing declarative 0.0.10
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching digest-crc 0.4.1
Installing digest-crc 0.4.1
Fetching unf_ext 0.0.7.6
Installing unf_ext 0.0.7.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/distiller/project/vendor/bundle/ruby/2.3.0/gems/unf_ext-0.0.7.6/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r
./siteconf20190926-723-dvbzjp.rb extconf.rb
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in
/Users/distiller/project/vendor/bundle/ruby/2.3.0/gems/unf_ext-0.0.7.6 for
inspection.
Results logged to
/Users/distiller/project/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.6/gem_make.out

An error occurred while installing unf_ext (0.0.7.6), and Bundler
cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.6' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  fastlane was resolved to 2.131.0, which depends on
    faraday-cookie_jar was resolved to 0.0.6, which depends on
      http-cookie was resolved to 1.0.3, which depends on
        domain_name was resolved to 0.5.20190701, which depends on
          unf was resolved to 0.1.4, which depends on
            unf_ext
Exited with code 5
CircleCI received exit code 5

如您所见,安装unf_ext时似乎失败。为什么是这样?我该如何解决呢?

我已经尝试在计算机上安装gem install unf_ext -v '0.0.7.6' --source 'http://rubygems.org/',并且工作正常。

continuous-integration circleci fastlane gemfile
2个回答
0
投票

Gemfile放在哪里?

它应该与fastlane目录位于同一目录(同一级别),以便工作。

因此,如果您遵循Fastlane文档,并且要在React Native或Flutter中构建应用程序,则Gemfile中应有一个iOS,在android目录中应有一个。


0
投票

这是CircleCI本身的问题,但此问题已得到解决。

© www.soinside.com 2019 - 2024. All rights reserved.