Problems with FasterCSV

I’m installing FasterCSV (sudo gem install fastercsv) but when I’m
using it with Rails (in a migration) I get an “uninitialized constant
FasterCSV” error:

rake aborted!
uninitialized constant FasterCSV
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:inconst_missing’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
const_missing' ./db/migrate//004_add_data.rb:3:inreal_up’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:210:in
`migrate’

So - in the gem directory when running rake I get a whole bunch of
permission errors like:

  1. Error:
    test_append(TestFasterCSVInterface):
    Errno::EACCES: Permission denied - ./test/temp_test_data.csv
    ./test/tc_interface.rb:16:in initialize' ./test/tc_interface.rb:16:insetup’

but when running sudo rake everything is fine.

Are the two problems (the Rails error and the permission error) related

to each other? When I change the permissions in the gem folder I can
run the tests with no errors, but I still get the “uninitialized
constant FasterCSV”

/megl