Jenkins Build Job Failed due to Ruby Gem Error
We have Jenkins build job with the ruby script. We want to require one gem(require 'net/ssh'). This gem failed while running via Jenkins. But Succeed while running in Jenkins Servers.
/usr/local/rvm/scripts/rubies/ruby-2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- net/ssh (LoadError) from /usr/local/rvm/scripts/rubies/ruby-2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /var/lib/jenkins/workspace/auto-sync/automation/jenkins/database_bkup/database_bk.rb:2:in `' Build step 'Execute shell' marked build as failure
In local gem list
minitest (5.10.1) multipart-post (2.0.0) net-ssh (4.2.0) net-telnet (0.1.1) nokogiri (1.8.1) openssl (default: 2.0.3) power_assert (0.4.1) psych (default: 2.2.2)
RubyGems Environment:
SYSTEM CONFIGURATION DIRECTORY: /etc
RUBYGEMS PLATFORMS:
ruby
x86_64-linux
GEM PATHS:
GEM CONFIGURATION:
REMOTE SOURCES:
SHELL PATH:
上一篇: 从Rakefile执行bash命令