Project

General

Profile

Bug #7635

Updated by Dominic Cleal over 10 years ago

Hammer nightlies have started printing an annoying warning on Ruby 1.8 installations: 

 <pre> 
 # hammer 
 /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:67: warning: already initialized constant DEFAULT_LABEL_INDENT 
 </pre> 

 rubygem-hammer_cli-0.1.3-1.201409240954gitf3c47c7.el6.noarch 
 rubygem-hammer_cli_foreman-0.1.3-1.201409191432gitc38f9c8.el6.noarch 

 I added some debug and found the following, the abstract.rb file is required twice through different code paths: 

 <pre> 
 /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/abstract.rb:67: here (RuntimeError) 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
	 from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli.rb:14 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
	 from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/bin/hammer:89 
	 from /usr/bin/hammer:19:in `load' 
	 from /usr/bin/hammer:19 
 </pre> 

 <pre> 
 /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:67: here (RuntimeError) 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
	 from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/command.rb:1 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
	 from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/apipie.rb:2 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
	 from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli.rb:17 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
	 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
	 from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/bin/hammer:89 
	 from /usr/bin/hammer:19:in `load' 
	 from /usr/bin/hammer:19 
 </pre>

Back