Looks quite entangled… Active* gems are heavily used by CloudForms, as they are linked to Ruby on Rails, and should be handled cautiously.
A strange thing is that you cannot have upgraded from 3.2 to 4.1. CloudForms 4.0, based on ManageIQ Darga, introduced RHEL 7 (resp. CentOS 7) as the underlying operating system, thus forcing a backup/restore procedure to do the migration. So the gem set on your appliance should be at worst the one from 4.0, mixed with 4.1.
I have check my CloudForms appliance, installed from 4.0 and updated to 4.1. Here is the version I have for the gems you mentioned:
- actionpack (5.0.0)
- activemodel (5.0.0)
- activerecord (5.0.0)
- activesupport (5.0.0)
- builder (3.2.2)
- fast_gettext (1.1.0)
- httpi (2.0.2)
- nori (2.1.0)
- rdoc (4.2.2, 4.2.0)
- sass (3.4.22, 3.4.21)
- wasabi (3.1.0)
As you can see, some have multiple versions. I traced down the case of rdoc
. Version 4.2.0 is installed by rubygem-rdoc package, which is a dependency of rubygems < ruby < cfme-gemset < cfme < cfme-appliance
. So removing it is definitely not a good idea. I can’t judge if it is a bug or not. @chessbyte, any thought about that ?
By the way, I checked which version is loaded in CloudForms context and it is version 4.2.2, provided by package cfme-gemset
:
$ vmdb
$ rails console
irb(main):001:0> gdep = Gem::Dependency.new('rdoc').matching_specs.max_by(&:version)
=> #<Gem::Specification:0x223da78 rdoc-4.2.2>
This behavior is enforced by the GEM_PATH
environment variable that gives precedence to cfme-gemset
gems:
$ env | grep GEMP_PATH
GEM_PATH=/opt/rh/cfme-gemset:/root/.gem/ruby:/opt/rh/rh-ruby22/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems
Can you rune the following command to identify the version CloudForms is using ?
$ vmdb
$ rails console << EOF
['actionpack', 'activemodel', 'activerecord', 'activesupport', 'builder', 'fast_gettext', 'httpi', 'nori', 'rdoc', 'sass', 'wasabi'].each { |g| puts Gem::Dependency.new(g).matching_specs.max_by(&:version).inspect }
EOF
I have the following output:
#<Gem::Specification:0x1f9d890 actionpack-5.0.0>
#<Gem::Specification:0x20d82a0 activemodel-5.0.0>
#<Gem::Specification:0x1fa0004 activerecord-5.0.0>
#<Gem::Specification:0x1f94da8 activesupport-5.0.0>
#<Gem::Specification:0x646734 builder-3.2.2>
#<Gem::Specification:0x1eacfe4 fast_gettext-1.1.0>
#<Gem::Specification:0x222ee60 httpi-2.0.2>
#<Gem::Specification:0x2226274 nori-2.1.0>
#<Gem::Specification:0x20c7a18 rdoc-4.2.2>
#<Gem::Specification:0x21366c0 sass-3.4.22>
#<Gem::Specification:0x2237970 wasabi-3.1.0>
If you have installed older versions of gems present in the CloudForms gemset, you’re stuck. I have tried to force the version of rdoc
on the rails console and it fails due to the fact that the 4.2.2 version is already loaded by CloudForms:
$ vmdb
$ rails console
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = false` instead.
(called from block in <top (required)> at /var/www/miq/vmdb/config/environments/production.rb:15)
Loading production environment (Rails 5.0.0)
irb(main):001:0> gem 'rdoc', '=4.2.0'
Gem::LoadError: can't activate rdoc (= 4.2.0), already activated rdoc-4.2.2. Make sure all dependencies are added to Gemfile.
from /opt/rh/cfme-gemset/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:332:in `block in replace_gem'
from (irb):1
from /opt/rh/cfme-gemset/gems/railties-5.0.0/lib/rails/commands/console.rb:65:in `start'
from /opt/rh/cfme-gemset/gems/railties-5.0.0/lib/rails/commands/console_helper.rb:9:in `start'
from /opt/rh/cfme-gemset/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:78:in `console'
from /opt/rh/cfme-gemset/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /opt/rh/cfme-gemset/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Again, why not rewriting the automation code that relies on builder
to use version 3.2.2 ?
Can you also provide the ERROR messages from logs ?