It probably means you are passing a parameter of the wrong type, so
the underlying code is calling gsub, expecting it to be a string I
imagine, but it is actually a File.
What is a Filestore? You should use the techniques described in the
Rails Guide on Debugging to break in and inspect the data to check
that it is what you expect.