Description of problem: require 'rest-client' fails with Gem::LoadError within irb and when executing automate methods but seems to work in Rails. irb(main):001:0> require 'rest-client' Gem::LoadError: Could not find 'mime-types' (< 4.0, >= 1.16) among 251 total gem(s) Checked in 'GEM_PATH=/opt/rh/cfme-gemset:/root/.gem/ruby:/opt/rh/rh-ruby23/root/usr/share/gems:/opt/rh/rh-ruby23/root/usr/local/share/gems', execute `gem env` for more information from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/dependency.rb:319:in `to_specs' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/specification.rb:1438:in `block in activate_dependencies' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/specification.rb:1427:in `each' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/specification.rb:1427:in `activate_dependencies' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/specification.rb:1409:in `activate' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems.rb:196:in `rescue in try_activate' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems.rb:193:in `try_activate' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:125:in `rescue in require' from /opt/rh/rh-ruby23/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:40:in `require' from (irb):1 from /opt/rh/rh-ruby23/root/usr/bin/irb:11:in `<main>' Version-Release number of selected component (if applicable): 5.9.0.11 How reproducible: Steps to Reproduce: 1. irb 2. 3. Actual results: Error above. Expected results: Additional info: This fails in Automate methods and irb but seems to work in Rails: [root@ip-172-31-10-85 vmdb]# rails c Loading production environment (Rails 5.0.6) irb(main):001:0> require 'rest-client' => true
Madhu - I would suggest checking with Brandon on this since he made changes in this area recently.
Ncatling, you need to install the "mime-types" gem on the system.
We are working on fixing the build so the user doesn't have to install mime-types gem.
https://github.com/ManageIQ/manageiq/pull/16581 along with https://github.com/ManageIQ/manageiq-automation_engine/pull/125 is one proposed solution for the problem. That said, we are probably going to go with the more simple solution of just installing `mime-types` in the gem directory. This will not get used when loading the appliance, but then will be available in automation scripts.
https://github.com/ManageIQ/manageiq-appliance-build/pull/254
New commit detected on ManageIQ/manageiq-appliance-build/master: https://github.com/ManageIQ/manageiq-appliance-build/commit/631cb490194b0f1e7ef6e97f0523402dbdac2316 commit 631cb490194b0f1e7ef6e97f0523402dbdac2316 Author: Satoe Imaishi <simaishi> AuthorDate: Mon Dec 4 11:38:29 2017 -0500 Commit: Satoe Imaishi <simaishi> CommitDate: Mon Dec 4 17:07:47 2017 -0500 Install 'mime-types' outside of bundle, as it's needed to load 'rest-client' in irb/automate. For bundle, we override with local path 'mime-types-redirector' https://bugzilla.redhat.com/show_bug.cgi?id=1518865 kickstarts/partials/post/bundler.ks.erb | 4 ++++ 1 file changed, 4 insertions(+)
New commit detected on ManageIQ/manageiq-appliance-build/gaprindashvili: https://github.com/ManageIQ/manageiq-appliance-build/commit/bb226ab0907912b62723dc4662992ba5dec0a0b5 commit bb226ab0907912b62723dc4662992ba5dec0a0b5 Author: Jason Frey <fryguy9> AuthorDate: Mon Dec 4 16:39:03 2017 -0500 Commit: Satoe Imaishi <simaishi> CommitDate: Mon Dec 4 17:25:39 2017 -0500 Merge pull request #254 from simaishi/add_mime_types Install 'mime-types' outside of bundle (cherry picked from commit 13c4d92aa883974ec8db92cefe79639cd0935938) https://bugzilla.redhat.com/show_bug.cgi?id=1518865 kickstarts/partials/post/bundler.ks.erb | 4 ++++ 1 file changed, 4 insertions(+)
Verified on 5.9.0.20 that require 'rest-client' doesn't fail with Gem::LoadError within irb.