Ruport gem 找不到 Table 方法。使用https://ruport.github.io/examples.html上的示例,我们看到了问题。我不确定这是我的配置的错误还是问题。
$ cat foo.csv
name,login time,machine
Gregory,10:00,bittle
Joe,11:45,soda
Jim,9:00,kitten
Joe,12:15,soda
Gregory,5:00,kitten
Joe,12:45,bittle
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
$ gem list ruport
*** LOCAL GEMS ***
ruport (1.7.1)
$ irb
>> require 'ruport'
=> true
>> t = Table("foo.csv")
Traceback (most recent call last):
4: from /Users/davidhooey/.rvm/rubies/ruby-2.7.1/bin/irb:23:in `<main>'
3: from /Users/davidhooey/.rvm/rubies/ruby-2.7.1/bin/irb:23:in `load'
2: from /Users/davidhooey/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/irb-1.2.3/exe/irb:11:in `<top (required)>'
1: from (irb):2
NoMethodError (undefined method `Table' for main:Object)
>>