I'm creating a Sinatra app that takes an uploaded CSV file and puts its contents in a hash. When I reference this hash in my app.rb like so:
hash = extract_values(path_to_filename)
I keep getting this error message:
undefined method `bytesize' for Hash:0x007fc5e28f2b90 #object_id
file: utils.rb location: bytesize line: 335
I read somewhere that this is a Webrick issue. I switched to Thin, the error's the same.
My hash / CSV file is of very small size, so it can't be the issue.
I'm using ruby 1.9.3p374.
Thanks!
hash = …
is the last expression in a Sinatra route, but I'm guessing and that's the problem with this problem! – Insecticideextract_values()
. As is, this is not a real question because it is vague and incomplete. – Indicate