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/
Regards.
On Aug 13, 3:23 am, Henry Bourne
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> 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
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---