CSV not working for Rails 3 in Production using passenger

一世执手 提交于 2020-01-04 01:58:08

问题


I currently have a problem where i am exporting some data and generating a CSV in rails3. In my controller i add the following at the top.

require 'CSV'

I then have my method that generates the CSV file. In development i am able to generate and download the csv file just fine but in production mode, passenger returns me the following error.

No such file to load -- CSV

wondering if anyone has had this issue because i thought the CSV library included in ruby 1.9.2, i am not using any gems for creating a CSV file.


回答1:


I think it is csv instead of CSV:

require 'csv'


来源:https://stackoverflow.com/questions/6132180/csv-not-working-for-rails-3-in-production-using-passenger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!