Open pgrandjean opened 2 years ago
So the error was coming from the fact that ruby was installed using rbenv, and in this case the keyword lib
appears two times, as in:
/Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/config.rb:87
Having fixed this locally in hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb
, I know get the following error:
[2021-11-06 23:56:32 (PID 93782 / TID 3320)] DEBUG - [ Plugins ] - [ platform_handler ] - Require from hybrid_platforms_conductor file hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef
Traceback (most recent call last):
25: from /Users/foo/.rbenv/versions/2.7.4/bin/run:23:in `<main>'
24: from /Users/foo/.rbenv/versions/2.7.4/bin/run:23:in `load'
23: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/bin/run:25:in `<top (required)>'
22: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/executable.rb:102:in `block (2 levels) in <class:Executable>'
21: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/executable.rb:102:in `map'
20: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/executable.rb:102:in `block (3 levels) in <class:Executable>'
19: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/executable.rb:99:in `block (2 levels) in <class:Executable>'
18: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/executable.rb:99:in `new'
17: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/config.rb:86:in `initialize'
16: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/config.rb:86:in `each'
15: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/config.rb:87:in `block in initialize'
14: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/config.rb:87:in `new'
13: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb:33:in `initialize'
12: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb:79:in `register_plugins_from_gems'
11: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb:79:in `each'
10: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb:81:in `block in register_plugins_from_gems'
9: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb:81:in `each'
8: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/plugins.rb:87:in `block (2 levels) in register_plugins_from_gems'
7: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
6: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
5: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/hybrid_platforms_conductor-33.9.2/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef.rb:3:in `<top (required)>'
4: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:71:in `require'
3: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:68:in `gem'
2: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:68:in `synchronize'
1: from /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem'
/Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/specification.rb:1374:in `activate': can't add a new key into hash during iteration (RuntimeError)
Which points to the following line:
Gem.loaded_specs[self.name] = self
Yes, the require issue has been reported already in #114 . However the iteration issue is a bit strange. Let's keep this ticket open to track the iteration issue. I know have access to MacOS so I'll be able to thoroughly test it.
I don't know why but the iteration on Gem.loaded_specs
ends by making a Gem.loaded_specs[self.name] = self
in /Users/foo/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/specification.rb
and that is rejected by Ruby.
Installed
hybrid-platforms-conductor
following the instructions. When runningrun --help
, I get the following error:The file is indeed missing.