Help with csv converter

Hi, I have the following and I am getting NoMethodError: undefined method `arity’ for nil:NilClass - Can someone explain what is happening?

CSV::Converters[:RemoveChars] = lambda do |field| 
    field.gsub(/^[^a-z0-9\.,]{1,}/i, '')
  rescue
    field
  end

def parse_csv(csv)
        options = {
          encoding: "bom|utf-8",
          skip_blanks: true, 
          headers: true,
          converters: :remove_chars
        }

loop through csv here

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs