微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Json2.5.1 gem 在本地机器上得到更新,但来自 Jenkins 的包更新失败

如何解决Json2.5.1 gem 在本地机器上得到更新,但来自 Jenkins 的包更新失败

过去曾有人发布过关于此的问题,但不幸的是,还没有人来解救我。

我在另一台机器(Macbook Pro)上托管了我的 Jenkins。在本地,在该系统上,当我进行“捆绑更新”时,一切正常。 另一方面,我在该机器上创建了一个 Jenkins 自由式项目,并尝试通过 Jenkins 通过构建 shell 脚本进行简单的“捆绑更新”。每次都失败并出现以下错误

+ bundle update json --source https://rubygems.org/
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.2.4`.
Ignoring digest-crc-0.6.3 because its extensions are not built. Try: gem pristine digest-crc --version 0.6.3
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0
Ignoring racc-1.5.2 because its extensions are not built. Try: gem pristine racc --version 1.5.2
Ignoring redcarpet-3.5.1 because its extensions are not built. Try: gem pristine redcarpet --version 3.5.1
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
Ignoring sqlite3-1.4.2 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.2
Ignoring unf_ext-0.0.7.7 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.7
Fetching gem Metadata from https://rubygems.org/.........
Fetching gem Metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.3
Using CFPropertyList 3.0.3
Using concurrent-ruby 1.1.8
Using i18n 1.8.10
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 5.2.5
Using public_suffix 4.0.6
Using addressable 2.7.0
Using httpclient 2.8.3
Fetching json 2.5.1
Installing json 2.5.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/pid5246/Code/Project/Project_1.x.x/.vendor/bundle/ruby/2.6.0/gems/json-2.5.1/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210409-62235-2c3b46.rb extconf.rb
creating Makefile

current directory:
/Users/pid5246/Code/Project/Project_1.x.x/.vendor/bundle/ruby/2.6.0/gems/json-2.5.1/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/Users/pid5246/Code/Project/Project_1.x.x/.vendor/bundle/ruby/2.6.0/gems/json-2.5.1/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
Fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
         ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
note: did not find header 'config.h' in framework 'ruby' (loaded from
'/Library/Developer/CommandLinetools/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1

make Failed,exit code 2

Gem files will remain installed in
/Users/pid5246/Code/Project/Project _1.x.x/.vendor/bundle/ruby/2.6.0/gems/json-2.5.1
for inspection.
Results logged to
/Users/pid5246/Code/Project/Project_1.x.x/.vendor/bundle/ruby/2.6.0/extensions/universal-darwin-19/2.6.0/json-2.5.1/gem_make.out

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

In Gemfile:
  jazzy was resolved to 0.13.6,which depends on
    cocoapods was resolved to 1.10.1,which depends on
      cocoapods-core was resolved to 1.10.1,which depends on
        algoliasearch was resolved to 1.27.5,which depends on
          json
Build step 'Execute shell' marked build as failure
Finished: FAILURE

非常感谢任何帮助!!!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。