Re: Error using FasterCSV

It did help. That was exactly it – I had named the file fastercvs.rb.
When I renamed it, it worked fine.

Thanks for your help,


----- Original Message ----
From: James G. [email protected]
To: ruby-talk ML [email protected]
Sent: Saturday, March 15, 2008 10:35:23 AM
Subject: Re: Error using FasterCSV

On Mar 15, 2008, at 7:29 AM, Glenn wrote:



I am trying to use FasterCSV and am getting an error.

Sorry to hear that. I’ll try to provide some guesses…

I installed the fastercsv gem and it appeared to install correctly.

This is the error that I’m getting:

…/fastercsv.rb:3: uninitialized constant FasterCSV (NameError)
from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require…rb:27:in gem_original_require' from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:inrequire’
from fastercsv.rb:1

That error is a little strange because it is complaining about a lack
of a FasterCSV constant in the require. The file you required though,
fastercsv.rb, does not have a FasterCSV constant anywhere in it.
(It’s a shim that loads some other code.)

My guess is this: you named your own file fastercsv.rb. When you try
to require the gem, Ruby is finding your file first and it fails to
load because FasterCSV was never defined. If I’m right, you just need
to rename your file and it will work.

Hope that helps.

James Edward G. II

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs