# CSV parse error (CONST\_MISSING)

**URL:** <https://www.ruby-forum.com/t/csv-parse-error-const-missing/111889>\
**Category:** Rails\
**Created:** [August 13, 2007, 12:23am UTC](https://www.ruby-forum.com/t/csv-parse-error-const-missing/111889 "2007-08-13T00:23:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/df705f/32.png) [@henry](https://www.ruby-forum.com/u/henry)\
**Post date:** [August 13, 2007, 12:23am UTC](https://www.ruby-forum.com/t/csv-parse-error-const-missing/111889/1 "2007-08-13T00:23:05Z")

</div>

Hi,

I have built a function in my app for the user to parse a CSV file and  
store the data in the application’s database. This works great in  
Locomotive on my Mac, but the app has been deployed to an IIS server and  
no longer works. The error message tells me that active\_support is  
throwing the error saying there is a CONST\_MISSING in one of my methods  
(parses the CSV file and prints it to a table for the user to confirm  
that their data and layout etc is being read correctly):

* * *

## def confirm\_csv\_data @user\_arr = Array.new index = -1 CSV::Reader.parse(params[:user\_csv]) do |row| index += 1 @user\_arr[index] = Array.new @user\_arr[index] \<\< row[0] @user\_arr[index] \<\< row[1] @user\_arr[index] \<\< row[2] end end

The line with the CONST\_MISSING error is this:

CSV::Reader.parse(params[:user\_csv]) do |row|

Sorry I can’t show the exact error message I can’t get to the IIS  
environment right now.

I’m a bit confused as to how this works on my Mac and not on IIS. As  
far as I’m aware the versions of Ruby, Rails etc… are all the same.

Any ideas please? Would appreciate it very much!

Thanks,  
Henry

---

<div class="post-metadata">

**Author:** ![henry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/df705f/32.png) [@henry](https://www.ruby-forum.com/u/henry)\
**Post date:** [August 13, 2007, 9:49am UTC](https://www.ruby-forum.com/t/csv-parse-error-const-missing/111889/2 "2007-08-13T09:49:16Z")

</div>

Just have a check  
require ‘csv’ =\> true  
in the irb terminal of that IIS environment.

If its false, then you need to check the gem.

Also try using Fastercsv.  
[http://fastercsv.rubyforge.org/](http://fastercsv.rubyforge.org/)

Regards.

On Aug 13, 3:23 am, Henry B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
