Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSV on heroku Cedar

I want to use the CSV module with rails 3.2.1 on heroku cedar, but

require 'CSV'

doesn't works

here is the error when testing with the console:

Loading production environment (Rails 3.2.1)
irb(main):001:0> require 'CSV'
LoadError: no such file to load -- CSV
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
    from (irb):1
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
like image 442
denisjacquemin Avatar asked Feb 20 '12 20:02

denisjacquemin


1 Answers

try

require 'csv'

it's case sensitive.

UPDATE: This isn't a Heroku problem mind you - if you did the same locally you'd get the same eror. CSV is in the standard library in Ruby 1.9.

like image 170
John Beynon Avatar answered Oct 20 '22 05:10

John Beynon