janlelis/unicode-display_width

1.3.1 Introduces Bug

jaibhavaya opened this issue · 9 comments

unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:5:in `module:DisplayWidth': uninitialized constant Gem::Util (NameError)

Same here:

rubocop --rails --display-cop-names --extra-details --display-style-guide --parallel
/var/lib/gems/2.4.0/gems/unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:5:in `<module:DisplayWidth>': uninitialized constant Gem::Util (NameError)
	from /var/lib/gems/2.4.0/gems/unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:4:in `<module:Unicode>'
	from /var/lib/gems/2.4.0/gems/unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:3:in `<top (required)>'
	from /var/lib/gems/2.4.0/gems/unicode-display_width-1.3.1/lib/unicode/display_width.rb:2:in `require_relative'
	from /var/lib/gems/2.4.0/gems/unicode-display_width-1.3.1/lib/unicode/display_width.rb:2:in `<top (required)>'
	from /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /var/lib/gems/2.4.0/gems/rubocop-0.55.0/lib/rubocop.rb:14:in `<top (required)>'
	from /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /var/lib/gems/2.4.0/gems/rubocop-0.55.0/bin/rubocop:6:in `<top (required)>'
	from /usr/local/bin/rubocop:23:in `load'
	from /usr/local/bin/rubocop:23:in `<main>'

same

I've just pushed 1.3.2 with a fix. Can you please check if it works for you?

Out of curiosity, can you post your ruby -v and gem -v?

that worked! thanks!

my bundle install/update are still fetching the 1.3.1 version. Has the fix been published, yet?

Thanks @janlelis! Latest does seem to work. Using the rh-ruby22 scl on CentOS 6:

[root@standalone-centos-68 ~]# scl enable rh-ruby22 '/opt/rh/rh-ruby22/root/usr/local/bin/hammer host delete --name $(hostname -f)'
/opt/rh/rh-ruby22/root/usr/local/share/gems/gems/unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:5:in `<module:DisplayWidth>': uninitialized constant Gem::Util (NameError)
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:4:in `<module:Unicode>'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/unicode-display_width-1.3.1/lib/unicode/display_width/index.rb:3:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/unicode-display_width-1.3.1/lib/unicode/display_width.rb:2:in `require_relative'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/unicode-display_width-1.3.1/lib/unicode/display_width.rb:2:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:121:in `require'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:121:in `require'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/output/utils.rb:1:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/output/adapter/table.rb:2:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:121:in `require'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:121:in `require'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/output/adapter.rb:3:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:121:in `require'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:121:in `require'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/output.rb:4:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli.rb:11:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/hammer_cli-0.10.2/bin/hammer:124:in `<top (required)>'
	from /opt/rh/rh-ruby22/root/usr/local/bin/hammer:23:in `load'
	from /opt/rh/rh-ruby22/root/usr/local/bin/hammer:23:in `<main>'
[root@standalone-centos-68 ~]# scl enable rh-ruby22 'ruby -v'
ruby 2.2.9p480 (2017-12-15 revision 61259) [x86_64-linux-gnu]
[root@standalone-centos-68 ~]# scl enable rh-ruby22 'gem -v'
2.4.5.4

@kkim-sf Try gem install unicode-display_width -v1.3.2

@janlelis thanks! turns out our custom nexus gem repository didn't have the latest version sync'd.

Great to hear it works again! Closing this issue