Manually add file to ActiveStorage (e.g. in tests): file_content = file_fixture('example.png').read cat.avatar.attach( io: StringIO.new(file_content), filename: 'example.png' )