The project is in a healthy, maintained state
A simple CSV reader.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
>= 0
 Project Readme

simple_csv_reader

Simple CSV reader.

Installation

Add this line to your application's Gemfile:

gem 'simple_csv_reader'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install simple_csv_reader

Usage

# csv_file content
#
# Name,Email Address
# tester1,tester1@csv.test
# tester2,tester2@csv.test

HEADERS = {
  name: 'Name',
  email: 'Email Address',
}.freeze

def import
  SimpleCsvReader.read(csv_file.path, HEADERS) do |row, row_number:|
    User.create!(name: row[:name], email: row[:email])
  end
end