CSV不适用于使用乘客的生产中的Rails 3 [英] CSV not working for Rails 3 in Production using passenger

查看:140
本文介绍了CSV不适用于使用乘客的生产中的Rails 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个问题,我导出一些数据,并生成一个CSV在rails3。在我的控制器中,我在顶部添加以下内容。

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'

然后我有我的方法生成CSV文件。
在开发中,我能够生成并下载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

想知道是否有人有这个问题,因为i认为CSV库包含在ruby 1.9.2中,我没有使用任何gem来创建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.

推荐答案

它是 csv 而不是 CSV

require 'csv'

这篇关于CSV不适用于使用乘客的生产中的Rails 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆