Ошибка при установке gemfile с fastlane на CircleCI - PullRequest
0 голосов
/ 26 сентября 2019

У меня есть следующий 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/' на свой компьютер, и он работает нормально.

1 Ответ

0 голосов
/ 29 сентября 2019

Где находится ваш Gemfile?

Для работы он должен находиться в том же каталоге (на том же уровне), что и каталог fastlane.

Так что, если вы следуете документам Fastlane и создаете приложение в ReactРодной или флаттер, у вас должно быть одно Gemfile в iOS и одно в android.

...