ruby / did_you_mean

The gem that has been saving people from typos since 2014
MIT License
1.87k stars 113 forks source link

undefined method issue #157

Closed wogho closed 3 years ago

wogho commented 3 years ago

redis-stat

undefined method `display_width' for "┌────────────────────────":String Did you mean? display

how fix that?

redis - 3.2.12 gem - 3.2.22 ruby - 3.0.2 centos 7

/usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:195:in cell_width': undefined methoddisplay_width' for "┌────────────────────────":String (NoMethodError) Did you mean? display from /usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:130:in block (2 levels) in to_s' from /usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:125:ineach' from /usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:125:in each_with_index' from /usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:125:inblock in to_s' from /usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:124:in map' from /usr/local/rvm/gems/ruby-3.0.2/gems/tabularize-0.2.10/lib/tabularize.rb:124:into_s' from /usr/local/rvm/gems/ruby-3.0.2/gems/redis-stat-0.4.14/lib/redis-stat.rb:387:in puts' from /usr/local/rvm/gems/ruby-3.0.2/gems/redis-stat-0.4.14/lib/redis-stat.rb:387:inoutput_static_info' from /usr/local/rvm/gems/ruby-3.0.2/gems/redis-stat-0.4.14/lib/redis-stat.rb:129:in block in start' from /usr/local/rvm/gems/ruby-3.0.2/gems/lps-0.2.1/lib/lps.rb:38:inloop' from /usr/local/rvm/gems/ruby-3.0.2/gems/option_initializer-1.5.1/lib/option_initializer.rb:96:in method_missing' from /usr/local/rvm/gems/ruby-3.0.2/gems/redis-stat-0.4.14/lib/redis-stat.rb:110:instart' from /usr/local/rvm/gems/ruby-3.0.2/gems/redis-stat-0.4.14/bin/redis-stat:13:in <top (required)>' from /usr/local/rvm/gems/ruby-3.0.2/bin/redis-stat:23:inload' from /usr/local/rvm/gems/ruby-3.0.2/bin/redis-stat:23:in `

'

olleolleolle commented 3 years ago

@dnldp55 Hello!

First off, this is not a defect in the did_you_mean library.

The issue is probably in tabularize, or redis-stat?

https://github.com/junegunn/tabularize

Hope this helps, and I'll close this report now. 👋