FasterCSV error in rails

I installed FasterCSV as an gem.
It is working fine in ruby scripts and from irb but not in rails.
If i do:
require ‘rubygems’
require ‘faster_csv’
from a rails console I get an error:
NameError: identifier index needs to be constant
from
/usr/lib/ruby/gems/1.8/gems/fastercsv-0.2.1/lib/faster_csv.rb:344:in
new' from /usr/lib/ruby/gems/1.8/gems/fastercsv-0.2.1/lib/faster_csv.rb:344 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:inrequire’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require’
from (irb):2

Any help appreciated!

Thanks,
Simon

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