On 30 Apr 2011, at 20:04, bertly_the_coder
<muchira-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi guys, When I export data into a .csv file, it works perfectly. when
> I push the code to heroku, I get the following error:
> ActionView::Template::Error (can''t convert Hash into String):
>
Are you running the same ruby version locally and in production ? This looks
like it might be a ruby 1.8 vs 1.9 thing (the csv library was rewritten for 1.9)
Fred
> My helper to generate the csv is:
> def generate_csv
> csv_str = CSV.generate(:col_sep => ",") do |csv|
> Entrant.find(:all).each do |entrant|
> csv << [entrant.firstname, entrant.lastname, entrant.email,
> entrant.entrydate]
> end
> end
> end
>
> Is there any reason why I would get this error?
>
> Thanks in advance for your help.
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.