Hi together.
I got this issue again in foreman 3.2.0 trying to migrate reports into new format.
I cannot Finnish this task because of the following issue.
Problem:
foreman-rake host_reports:migrate
Traceback (most recent call last):
12: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
11: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
10: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/setup.rb:10:in `<top (required)>'
9: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'
8: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'
7: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/setup.rb:10:in `block in <top (required)>'
6: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
5: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `setup'
4: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `map'
3: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
2: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
1: from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:31:in `block in setup'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:312:in `check_for_activated_spec!': You have already activated thor 1.2.1, but your Gemfile requires thor 1.1.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
Expected outcome:
Foreman and Proxy versions:
3.2.0
Foreman and Proxy plugin versions:
foreman_fog_proxmox 0.14.0
foreman_memcache 0.1.1
foreman_puppet 3.0.5
puppetry_foreman 5.0.0
Distribution and version:
5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:04:27 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
20.04.4 LTS
Other relevant data:
/var/log/foreman/cron.log
requires thor 1.1.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:31:in `block in setup'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `map'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `setup'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `block in <top (required)>'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'
[2022-04-05 18:00:03] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `<top (required)>'
[2022-04-05 18:00:03] from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
[2022-04-05 18:00:03] from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
[2022-04-05 18:30:02] /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:312:in `check_for_activated_spec!': You have already activated thor 1.2.1, but your Gemfile requires thor 1.1.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:31:in `block in setup'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/spec_set.rb:147:in `each'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `map'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/runtime.rb:26:in `setup'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `block in <top (required)>'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'
[2022-04-05 18:30:02] from /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `<top (required)>'
[2022-04-05 18:30:02] from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
[2022-04-05 18:30:02] from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/usr/share/foreman % cat Gemfile
# foreman plugins import this file therefore __FILE__ cannot be used
FOREMAN_GEMFILE = __FILE__ unless defined? FOREMAN_GEMFILE
require_relative 'config/boot_settings'
source 'https://rubygems.org'
case SETTINGS[:rails]
when '6.0'
gem 'rails', '~> 6.0.3.1'
else
raise "Unsupported Ruby on Rails version configured in settings.yaml: #{SETTINGS[:rails]}"
end
gem 'rest-client', '>= 2.0.0', '< 3', :require => 'rest_client'
gem 'audited', '>= 4.9.0', '< 5'
gem 'will_paginate', '>= 3.1.7', '< 4'
gem 'ancestry', '>= 3.0.7', '< 4', '!= 3.2.0'
gem 'scoped_search', '>= 4.1.8', '< 5'
gem 'ldap_fluff', '>= 0.5.0', '< 1.0'
gem 'apipie-rails', '>= 0.5.17', '< 0.6.0'
gem 'apipie-dsl', '>= 2.2.6'
# Pin rdoc to prevent updating bundled psych (https://github.com/ruby/rdoc/commit/ebe185c8775b2afe844eb3da6fa78adaa79e29a4)
# Rails 6.0 is incompatible with Psych 4, Rails 6.1 should work
gem 'rdoc', '< 6.4'
gem 'rabl', '~> 0.14.2'
gem 'oauth', '>= 0.5.4', '< 1'
gem 'deep_cloneable', '>= 3', '< 4'
gem 'validates_lengths_from_database', '~> 0.5'
gem 'friendly_id', '>= 5.3.0', '< 5.4'
gem 'secure_headers', '~> 6.3'
gem 'safemode', '>= 1.3.5', '< 2'
gem 'fast_gettext', '~> 1.4'
gem 'gettext_i18n_rails', '~> 1.8'
gem 'rails-i18n', '~> 6.0'
gem 'i18n', '~> 1.1'
gem 'logging', '>= 1.8.0', '< 3.0.0'
gem 'fog-core', '2.1.0'
gem 'net-scp'
gem 'net-ssh', '4.2.0'
gem 'net-ldap', '>= 0.16.0'
gem 'net-ping', :require => false
gem 'activerecord-session_store', '>= 2.0.0', '< 3'
gem 'sprockets', '~> 4.0'
gem 'sprockets-rails', '~> 3.0'
gem 'responders', '~> 3.0'
gem 'roadie-rails', '~> 2.0'
gem 'deacon', '~> 1.0'
gem 'webpack-rails', '~> 0.9.8'
gem 'mail', '~> 2.7'
gem 'sshkey', '~> 1.9'
gem 'dynflow', '>= 1.4.4', '< 2.0.0'
gem 'daemons'
gem 'bcrypt', '~> 3.1'
gem 'get_process_mem'
gem 'rack-cors', '~> 1.0.2', require: 'rack/cors'
gem 'jwt', '~> 2.2.2'
gem 'graphql', '~> 1.8.0'
gem 'graphql-batch'
Dir["#{File.dirname(FOREMAN_GEMFILE)}/bundler.d/*.rb"].each do |bundle|
instance_eval(Bundler.read_file(bundle))
end
gem "thor", "1.1.0"
How can I solve this issue?
BR. Torsten