I don't know Ruby but want to run an script where:
D:/Heather/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- iconv (LoadError)
it works somehow if I comment iconv code but it will be much better if I can recode this part:
return Iconv.iconv('UTF-8//IGNORE', 'UTF-8', (s + ' ') ).first[0..-2]
without iconv
. Maybe I can use String#encode
here somehow?
Iconv was deprecated (removed) in 1.9.3. You can still install it.
Reference Material if you unsure: https://rvm.io/packages/iconv/
However the suggestion is that you don't and rather use:
string.encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "?")
API
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With