我们正在使用Jenkins 2.62。在尝试使用Jenkins构建时,我收到以下错误:
[工作空间] $ / bin / bash -l /var/folders/km/33wcncls1874x2xv50nv43480000gn/T/jenkins1804164065511577211.sh /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:318:in
to_specs': Could not find 'claide' (< 2.0, >= 1.0.0) among 32 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=file:/Users/administrator/.jenkins/plugins/ruby-runtime/WEB-INF/lib/stapler-jruby-1.209.jar!/gem:/Users/administrator/Software/ruby', execute
gem envfor more information from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1402:in
阻止在activate_dependencies&#39; 来自/Library/Ruby/Site/2.0.0/rubygems/specification.rb:1391:ineach' from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1391:in
activate_dependencies&#39; 来自/Library/Ruby/Site/2.0.0/rubygems/specification.rb:1373:inactivate' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:67:in
块中的宝石&#39; 来自/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:66:insynchronize' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:66:in
gem&#39; 来自/ usr / local / bin / pod:22:在`&#39;
以下是我们在执行Shell
中使用的脚本**rm -fr *.xcworkspace
rm -fr ~/Library/Caches/CocoaPods/
rm -fr Pods/
rm -rf ~/Library/Developer/Xcode/DerivedData/*
/usr/local/bin/pod install
xcodebuild -workspace Proj.xcworkspace -scheme Proj_test -sdk iphoneos -configuration Release archive -archivePath ${WORKSPACE}/Proj/Build/Release-iphoneos/Proj.xcarchive
xcodebuild -exportArchive -archivePath ${WORKSPACE}/ChannelConnect/Build/Release-iphoneos/Proj.xcarchive -exportOptionsPlist ${WORKSPACE}/exportOptionsPlist.plist -exportPath ${WORKSPACE}/Proj/Build/Release-iphoneos**
当我们尝试&#34; Pod Install&#34;对于手动服务器中的相同路径,它工作得很好。
我们可以更改Jenkins pods路径吗?
答案 0 :(得分:0)
听起来詹金斯和你的PATH
混在一起。这很常见。您必须明确告诉Jenkins将/usr/local/bin
添加到您的PATH。
查看System Information -> Environment Variables
下的当前内容以验证此理论。
通过添加Configure System -> Environment Variables
PATH="/usr/local/bin:$PATH"
下的值
如果您有奴隶,则必须在Manage Nodes -> Node -> System Info