arthur-net arthur-net - 3 months ago 17
Ruby Question

cannot load such file -- smarter_csv (LoadError)

I want to use

gem, but when I write in my code
require "smarter_csv"
it gives me error message below:

`require': cannot load such file -- smarter_csv (LoadError)

When i try in irb:

001 > require 'smarter_csv'
=> true

I tried
require "smarter_csv/smarter_csv.rb"
does not help!

How can i fix it?


I have just tried this gem. It works perfectly fine.


Step 1 - Install Gem

$ gem install 'smarter_csv'

Step 2 - Create new ruby file test.rb

require 'smarter_csv'

data = SmarterCSV.process('./users.csv')
puts data

Step 3 - Make sure you have your CSV file ready

Step 4 - Run the script

$ ruby test.rb 

Should work just fine