问题
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