Rails: undefined method ‘[]’ for #<Enumerable::Enumerator>

I was moving an older Rails app to a new server when I encountered this error. This gives a good description of what was going on and shows how to fix it:
http://groups.google.com/group/attachment_fu/browse_thread/thread/502dd4504a59c84d.
Ruby 1.8.7 and acts_as_attachment didn’t get along with each other in my case. However, there’s a typo where .first == ‘/’ is replaced.
starts_with(‘/’) should be starts_with?(‘/’).
That’s no rocket science but could be useful for noobs (on Rails).