I have just started learning ruby and Im using ruby 1.9.2p0 (2010-08-18
revision 29036) [x86_64-darwin10.5.0].
Im trying to run a program from a book for CSV reader and when I try to
run it (using csv file as input) i get error from CSV library which is
under 1.8. And Im not sure if its correct…
Can someone please help
Thanks
guru
Processing sample.csv
./csv_reader.rb:14:in read_in_csv_data': uninitialized constant CsvReader::BooksInStock (NameError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:312:inopen_reader’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:532:in parse' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:560:ineach’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:531:in parse' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:311:inopen_reader’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:94:in foreach' from ./csv_reader.rb:13:inread_in_csv_data’
from ./stock_stats.rb:12
from ./stock_stats.rb:10:in `each’
from ./stock_stats.rb:10
i came across this forum http://www.ruby-forum.com/topic/206773 but i
still dont get what I have to use. Also I thought it might help to
provide my code here