1

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

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `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?

Falko
  • 17,076
  • 13
  • 60
  • 105
arthur-net
  • 1,138
  • 1
  • 13
  • 34

1 Answers1

3

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

Try:

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

Brian
  • 14,610
  • 7
  • 35
  • 43
Lukasz Muzyka
  • 2,783
  • 1
  • 30
  • 41