Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby not loading CSV from stdlib

Tags:

ruby

I'm not really sure why this isn't working and I am stuck finding a solution. Very simply, I am running a little script that does require 'CSV', which has been working fine on my Mac with 1.9.3-p327, but has not been working from the server on p374.

The error I get is

/home/deployer/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- CSV (LoadError)<br> from /home/deployer/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'

like image 619
ovatsug25 Avatar asked Jan 23 '13 13:01

ovatsug25


1 Answers

The case is important. CSV is not defined yet csv should be.

require 'csv'

I don't have a Mac at hand but it probably works because your FS (HSF+) is case insensitive whereas the server is sensitive.

like image 97
gmalette Avatar answered Oct 23 '22 07:10

gmalette