My mistake. I was getting inconsistent errors without :avatar_file_name, but it must have been due to something else. It's working with just :avatar now.