Closed stejskalleos closed 3 years ago
Missing config.eager_load_paths += Dir["#{config.root}/lib"] in engine.rb can cause NameError (uninitialized constant RedhatAccess::VERSION)
config.eager_load_paths += Dir["#{config.root}/lib"]
engine.rb
NameError (uninitialized constant RedhatAccess::VERSION)
How to reproduce:
gem 'foreman_rh_cloud', path: '/home/vagrant/rh_cloud'
Gemfile
insights-client --test-connection
It will fail, because of: NameError (uninitialized constant RedhatAccess::VERSION)
cc: @ShimShtein
Indeed in latest foreman the loading mechanism became more strict, so lib folder no longer loads unless added to eager_load_paths
lib
eager_load_paths
Missing
config.eager_load_paths += Dir["#{config.root}/lib"]
inengine.rb
can causeNameError (uninitialized constant RedhatAccess::VERSION)
How to reproduce:
gem 'foreman_rh_cloud', path: '/home/vagrant/rh_cloud'
toGemfile
insights-client --test-connection
on rhel hostIt will fail, because of:
NameError (uninitialized constant RedhatAccess::VERSION)
cc: @ShimShtein