mimimi / ruby-tsv

Simple TSV parser
MIT License
37 stars 4 forks source link

NameError: uninitialized constant TSV::Row::Forwardable #1

Closed amir20 closed 10 years ago

amir20 commented 10 years ago

I get the following when doing require 'csv'

require 'tsv'
NameError: uninitialized constant TSV::Row::Forwardable
    from /Users/amir.raminfar/.rvm/gems/ruby-2.1.2/gems/tsv-0.0.1/lib/tsv/row.rb:3:in `<class:Row>'
    from /Users/amir.raminfar/.rvm/gems/ruby-2.1.2/gems/tsv-0.0.1/lib/tsv/row.rb:2:in `<module:TSV>'
    from /Users/amir.raminfar/.rvm/gems/ruby-2.1.2/gems/tsv-0.0.1/lib/tsv/row.rb:1:in `<top (required)>'
    from /Users/amir.raminfar/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/amir.raminfar/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/amir.raminfar/.rvm/gems/ruby-2.1.2/gems/tsv-0.0.1/lib/tsv.rb:2:in `<top (required)>'
    from /Users/amir.raminfar/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /Users/amir.raminfar/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /Users/amir.raminfar/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from (irb):1
    from /Users/amir.raminfar/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'
brain-geek commented 10 years ago

@amir20 Thanks for bug report. I've already reproduced it.

Fixing it right now.

amir20 commented 10 years ago

Nice. I was going to fix it but I am in between meetings. I'll you do it instead. :dancer:

brain-geek commented 10 years ago

@amir20 fast fix is to require 'forwardable' ( http://www.ruby-doc.org/stdlib-2.0/libdoc/forwardable/rdoc/Forwardable.html ) in your code before requiring tsv.

But I want to add test that will actually check that in spec - this is a bit harder.

brain-geek commented 10 years ago

Fixed in v 0.0.2 , which is already released on Rubygems.