I have ran into an issue upgrading chef-client using omnibus_updater cookbook.
It upgrades Chef omnibus rpm on my rhel Linux hosts, leaving gem files downloaded by previous Chef runs in place.
However despite that they are listed by ‘gem list’ they are not usable. For example ‘bluepill’ (used to run chef-client itself) fails with following error:
---- Begin output of /opt/chef/embedded/bin/bluepill load /etc/bluepill/chef-client.pill ---- STDOUT: STDERR: /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:308:in `to_specs': Could not find 'activesupport' (< 5, >= 3.2) among 91 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/home/geadmin/.gem/ruby/2.1.0:/opt/chef/embedded/lib/ruby/gems/2.1.0', execute `gem env` for more information from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1439:in `block in activate_dependencies' from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in `each' from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in `activate_dependencies' from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1410:in `activate' from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem' from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize' from /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:67:in `gem' from /opt/chef/embedded/bin/bluepill:22:in `<main>' ---- End output of /opt/chef/embedded/bin/bluepill load /etc/bluepill/chef-client.pill ----
In this case the issue is caused by lack of activesupport gem which was part of chef 12.5.1 and is not present in 12.11.18… Is there any elegant resolution to that?