2012-12-03 18 views
0

我已經安裝了這顆寶石 - https://github.com/pluskid/rmmseg-cpp如何修復#<Enumerator:「錯誤的」未定義的方法長度「?

(文檔:http://rmmseg-cpp.rubyforge.org/

當我嘗試運行此命令示例:$echo "我們都喜歡用 Ruby" | rmmseg

我得到:

/Users/webmagnets/.rvm/gems/[email protected]/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb:24:in `next_token': undefined method `length' for #<Enumerator: "我們都喜歡用 Ruby\n":each_char> (NoMethodError) 
    from /Users/webmagnets/.rvm/gems/[email protected]/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb:44:in `segment' 
    from /Users/webmagnets/.rvm/gems/[email protected]/gems/rmmseg-0.1.6/lib/rmmseg.rb:12:in `segment' 
    from /Users/webmagnets/.rvm/gems/[email protected]/gems/rmmseg-0.1.6/bin/rmmseg:65:in `<top (required)>' 
    from /Users/webmagnets/.rvm/gems/[email protected]/bin/rmmseg:23:in `load' 
    from /Users/webmagnets/.rvm/gems/[email protected]/bin/rmmseg:23:in `<main>' 

回答

0

我想通了。我正在使用rmmseg而不是rmmseg-cpp。

相關問題