Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

key<entry_description> not found #6

Open
jwoertink opened this issue Dec 6, 2022 · 0 comments
Open

key<entry_description> not found #6

jwoertink opened this issue Dec 6, 2022 · 0 comments

Comments

@jwoertink
Copy link

I was just trying the example in the README:

require "guevara"

nacha = Guevara::Nacha.new(
  priority_code:    01,
  destination_id:   '12345678',
  origin_id:        '12345678',
  created_at:       '2014-11-28T13:30',
  id:               'A',
  destination_name: 'Rubylit',
  origin_name:      'Zest',
  batches:          [
    {
      service_class:  '200',
      company_name:   'rubylit',
      company_id:     'Ruby123',
      company_date:   '2014-09-18',
      origin_id:      '12345678',
      effective_date: '2014-09-21',
      transactions:   [{
        id:               'FD00AFA8A0F7',
        type:             'debit',
        amount:           1600,
        name:             'marge baker',
        additional_info:  'wellsville|KS|66092|101 2nd st|',
        telephone:        '5858232966',
        account_type:     'checking',
        routing_number:   103100195,
        account_number:   '3ACCOUNT234'
      }]
    }
  ]
)

puts nacha.to_s

running this with ruby test.tb gives me this error:

❯ ruby test.rb 
/home/jeremy/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/guevara-1.0.0/lib/guevara/row.rb:23:in `format': key<entry_description> not found (KeyError)
	from /home/jeremy/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/guevara-1.0.0/lib/guevara/row.rb:23:in `to_s'
	from /home/jeremy/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/guevara-1.0.0/lib/guevara/batch.rb:20:in `to_s'
	from /home/jeremy/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/guevara-1.0.0/lib/guevara/nacha.rb:25:in `block in to_s'
	from /home/jeremy/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/guevara-1.0.0/lib/guevara/nacha.rb:25:in `each'
	from /home/jeremy/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/guevara-1.0.0/lib/guevara/nacha.rb:25:in `to_s'
	from test.rb:34:in `<main>'

Here's my Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    guevara (1.0.0)

PLATFORMS
  x86_64-linux

DEPENDENCIES
  guevara

BUNDLED WITH
   2.3.9

I tried on Ruby 2.5, 2.7, and 3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant