问题 1:
cannot load such file -- jcode
修复方法:有两个文件需要改
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rmmseg-0.1.6/lib/rmmseg.rb
改法如下:
#require 'jcode'
require 'jcode' if RUBY_VERSION < '1.9'
问题 2:
NoMethodError: undefined method `length' for #<Enumerator: "high blue test":each_char>
修复方法:有一个文件需要改
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb
第 18 行改法如下:
# @chars = text.each_char
@chars = text.each_char.to_a