G
Guru I.
Hi
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:in
`open_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:in
`each'
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:in
`open_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:in `read_in_csv_data'
from ./stock_stats.rb:12
from ./stock_stats.rb:10:in `each'
from ./stock_stats.rb:10
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:in
`open_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:in
`each'
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:in
`open_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:in `read_in_csv_data'
from ./stock_stats.rb:12
from ./stock_stats.rb:10:in `each'
from ./stock_stats.rb:10