What's the output of this command: ruby193-ruby -raudited-activerecord
-etrue
The error about "audited/activerecord" (with a slash) is probably a
consequence of "audited-activerecord" (with a hyphen) failing to load,
but that ought to work.
···
On 11/05/16 21:30, askstack98@gmail.com wrote:
> I am trying to upgrade foreman 1.3 to 1.4 with the rpm method. Can
> anyone help me with this error. Thanks.
>
> [root]# foreman-rake db:migrate --trace
> rake aborted!
> Gem loading error: cannot load such file -- audited/activerecord
Dominic
Thanks. It returns blank.
[root]# ruby193-ruby -raudited-activerecord -etrue
[root]# ruby193-ruby -v -raudited-activerecord -etrue
ruby 1.9.3p484 (2013-11-22) [x86_64-linux]
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults/operating_system.rb:44:
warning: method redefined; discarding old default_dir
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults.rb:21: warning:
previous definition of default_dir was here
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults/operating_system.rb:52:
warning: method redefined; discarding old default_path
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults.rb:63: warning:
previous definition of default_path was here
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults/operating_system.rb:57:
warning: method redefined; discarding old default_bindir
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults.rb:88: warning:
previous definition of default_bindir was here
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults/operating_system.rb:65:
warning: method redefined; discarding old default_ext_dir_for
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/defaults.rb:103: warning:
previous definition of default_ext_dir_for was here
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/class/attribute.rb:70:
warning: assigned but unused variable - instance_reader
-e:1: warning: possibly useless use of true in void context
···
On Thursday, May 12, 2016 at 6:19:19 AM UTC-4, Dominic Cleal wrote:
>
> On 11/05/16 21:30, askst...@gmail.com wrote:
> > I am trying to upgrade foreman 1.3 to 1.4 with the rpm method. Can
> > anyone help me with this error. Thanks.
> >
> > [root]# foreman-rake db:migrate --trace
> > rake aborted!
> > Gem loading error: cannot load such file -- audited/activerecord
>
> What's the output of this command: ruby193-ruby -raudited-activerecord
> -etrue
>
> The error about "audited/activerecord" (with a slash) is probably a
> consequence of "audited-activerecord" (with a hyphen) failing to load,
> but that ought to work.
>
> --
> Dominic Cleal
> dom...@cleal.org
>
I'd have expected that to fail given the foreman-rake error.
You could next uncomment/add some debug into bundler_ext by editing
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb.
It should have a line like this:
and commenting the puts should print an error when running the
foreman-rake command.
···
On 12/05/16 14:56, askstack98@gmail.com wrote:
> Dominic
> Thanks. It returns blank.
> [root]# ruby193-ruby -raudited-activerecord -etrue
[root]# foreman-rake db:migrate --trace
Caught error FOREMAN-RAKE: cannot load such file –
active_support/security_utils
rake aborted!
Gem loading error: cannot load such file – audited/activerecord
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in strict_error' /opt/rh/ruby193/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/rh/ruby193/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/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:inblock in system_require'
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in each' /opt/rh/ruby193/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:11: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' /usr/share/foreman/Rakefile:1:in<top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/rake_module.rb:25:in load' /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' /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' /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' /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' /opt/rh/ruby193/root/usr/bin/rake:32:in<main>'
···
On Thursday, May 12, 2016 at 10:00:08 AM UTC-4, Dominic Cleal wrote:
>
> On 12/05/16 14:56, askst...@gmail.com wrote:
> > Dominic
> > Thanks. It returns blank.
> > [root]# ruby193-ruby -raudited-activerecord -etrue
>
> I'd have expected that to fail given the foreman-rake error.
>
> You could next uncomment/add some debug into bundler_ext by editing
> /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb.
>
> It should have a line like this:
>
>
> https://github.com/bundlerext/bundler_ext/blob/a3c5a0794d4698938a605a45301d1582ce986082/lib/bundler_ext/bundler_ext.rb#L41
>
> and commenting the puts should print an error when running the
> foreman-rake command.
>
> --
> Dominic Cleal
> dom...@cleal.org
>
You might have some mismatched ruby193-rubygem-active* and
ruby193-rubygem-action* packages, some with a security fix and some
without that cause this error. The best way to resolve it would be to
check the vendor of each package (rpm -qi) and ensure they're from the
same source.
The source has changed a few times for various reasons and Foreman 1.3
used to contain our builds of them. I'd recommend using the CentOS SCLo
builds from http://mirror.centos.org/centos/6/sclo/x86_64/rh nowadays,
so replace any package with the two prefixes mentioned above with the
SCLo ones - or at least a consistent source.
You are absolutely right. I had a mix of packages from SCL and puppet
repos.
After I re-installed theses packages from SCL, upgrade started to work.
ruby193-rubygem-activerecord-3.2.8-12.el6.noarch
ruby193-rubygem-activesupport-3.2.8-6.el6.noarch
ruby193-rubygem-activeresource-3.2.8-3.el6.noarch
ruby193-rubygem-activemodel-3.2.8-3.el6.noarch
ruby193-rubygem-actionmailer-3.2.8-2.el6.noarch
ruby193-rubygem-actionpack-3.2.8-16.el6.noarch
Thank you so much!
···
On Thursday, May 12, 2016 at 10:37:38 AM UTC-4, Dominic Cleal wrote:
>
> On 12/05/16 15:32, askst...@gmail.com wrote:
> > [root]# foreman-rake db:migrate --trace
> > Caught error FOREMAN-RAKE: cannot load such file --
> > active_support/security_utils
> > rake aborted!
>
> You might have some mismatched ruby193-rubygem-active* and
> ruby193-rubygem-action* packages, some with a security fix and some
> without that cause this error. The best way to resolve it would be to
> check the vendor of each package (rpm -qi) and ensure they're from the
> same source.
>
> The source has changed a few times for various reasons and Foreman 1.3
> used to contain our builds of them. I'd recommend using the CentOS SCLo
> builds from http://mirror.centos.org/centos/6/sclo/x86_64/rh nowadays,
> so replace any package with the two prefixes mentioned above with the
> SCLo ones - or at least a consistent source.
>
> --
> Dominic Cleal
> dom...@cleal.org
>