Undefined method 'each' in acts_as_taggable_on with rails 3 beta 3 and ruby 1.9


I am trying to use acts_as_taggable_on in my new projects. But I got
Error when I try to save tags.
undefined method `each’ for “[]”:String

NoMethodError: undefined method each' for "":String from C:/Ruby19/lib/ruby/gems/1.9.1/gems/ activerecord-3.0.0.beta3/lib/active_record/associations/ association_collection.rb:347:inreplace’
from C:/Ruby19/lib/ruby/gems/1.9.1/gems/
block in collection_accessor_methods' from (irb):6 from C:/Ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta3/ lib/rails/commands/console.rb:47:instart’
from C:/Ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta3/
lib/rails/commands/console.rb:8:in start' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta3/ lib/rails/commands.rb:34:in<top (required)>’
from script/rails:9:in require' from script/rails:9:in

I guess it maybe because ruby 1.9 doesn’t support each for string.

Does anyone have the same problem? Any solution?


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