Foreman upgrade from 1.9 to 1.10 db:migrate rake aborted

Hi,

I have successfully upgraded foreman from 1.6 to 1.7, to 1.8, and to 1.9
but now I am trying to upgrade from 1.9 to 1.10 and I am running into
issues I think with fog-libvirt.

there was no problem with yum upgrade but when I am running db:migrate I
get the following.

foreman-rake db:migrate --trace
rake aborted!
Gem loading error: cannot load such file – fog/libvirt
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in
strict_error' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:53:inrescue in rescue in block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:43:in
rescue in block in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:inblock in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in
each' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:insystem_require'
/usr/share/foreman/config/application.rb:14:in <top (required)>' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require&#39; /usr/share/foreman/Rakefile:1:in<top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/rake_module.rb:25:in load&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/rake_module.rb:25:inload_rakefile'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:501:in
raw_load_rakefile&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:82:inblock in
load_rakefile'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:81:inload_rakefile'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:65:in block in run&#39; /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:instandard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run&#39; /opt/rh/ruby193/root/usr/bin/rake:32:in<main>'

rpm -qa|grep fog-libvirt
tfm-rubygem-fog-libvirt-0.0.2-2.el6.noarch

scl enable ruby193 bash

gem list|grep fog
fog (1.27.0)
fog-atmos (0.1.0)
fog-brightbox (0.7.1)
fog-core (1.27.4)
fog-ecloud (0.0.2)
fog-json (1.0.2)
fog-profitbricks (0.0.1)
fog-radosgw (0.0.3)
fog-sakuracloud (0.1.1)
fog-serverlove (0.1.1)
fog-storm_on_demand (0.1.0)
fog-terremark (0.0.3)
fog-vmfusion (0.0.1)
fog-voxel (0.0.2)
fog-xml (0.1.1)

RPM seems to be installed but gem fog-libvirt is not there.

I tried installing the gem manually and I get the follwoing:

gem install fog-libvirt
Fetching: fog-json-1.0.2.gem (100%)
Fetching: ruby-libvirt-0.7.0.gem (100%)
Building native extensions. This could take a while…
ERROR: Error installing fog-libvirt:
ERROR: Failed to build gem native extension.

    /opt/rh/ruby193/root/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at
/opt/rh/ruby193/root/usr/share/include/ruby.h

Gem files will remain installed in
/opt/rh/ruby193/root/usr/local/share/gems/gems/ruby-libvirt-0.7.0 for
inspection.
Results logged to
/opt/rh/ruby193/root/usr/local/share/gems/gems/ruby-libvirt-0.7.0/ext/libvirt/gem_make.out

/opt/rh/ruby193/root/usr/share/include directory does not exist.

Any clue?

Thanks!

Andre

Which version of ruby193-rubygems do you have installed?

If you have 1.8.24, run "yum downgrade ruby193-rubygems-1.8.23".

··· On 09/01/17 23:43, Andre Mosin wrote: > Hi, > > I have successfully upgraded foreman from 1.6 to 1.7, to 1.8, and to 1.9 > but now I am trying to upgrade from 1.9 to 1.10 and I am running into > issues I think with fog-libvirt. > > there was no problem with yum upgrade but when I am running db:migrate I > get the following. > > foreman-rake db:migrate --trace > rake aborted! > Gem loading error: cannot load such file -- fog/libvirt


Dominic Cleal
dominic@cleal.org

Hi Dominic,

I already had ruby193-rubygems-1.8.23 installed.

I end up fixing it by removing foreman-libvirt. After that I was able to
upgrade to 1.10, then I upgraded all the way to 1.12, and re-installed
foreman-libvirt and that worked. I am on version 1.12 now and I am running
into other issues that I will post on a different topic.

Thanks!

Andre Mosin

··· On Tuesday, January 10, 2017 at 7:04:54 AM UTC-8, Dominic Cleal wrote: > > On 09/01/17 23:43, Andre Mosin wrote: > > Hi, > > > > I have successfully upgraded foreman from 1.6 to 1.7, to 1.8, and to 1.9 > > but now I am trying to upgrade from 1.9 to 1.10 and I am running into > > issues I think with fog-libvirt. > > > > there was no problem with yum upgrade but when I am running db:migrate I > > get the following. > > > > foreman-rake db:migrate --trace > > rake aborted! > > Gem loading error: cannot load such file -- fog/libvirt > > Which version of ruby193-rubygems do you have installed? > > If you have 1.8.24, run "yum downgrade ruby193-rubygems-1.8.23". > > -- > Dominic Cleal > dom...@cleal.org >