# File\_column exception when file is unexpectedly deleted

**URL:** <https://www.ruby-forum.com/t/file-column-exception-when-file-is-unexpectedly-deleted/89992>\
**Category:** Rails\
**Created:** [March 24, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/file-column-exception-when-file-is-unexpectedly-deleted/89992 "2007-03-24T18:40:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuktuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/77aa72/32.png) [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Post date:** [March 24, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/file-column-exception-when-file-is-unexpectedly-deleted/89992/1 "2007-03-24T18:40:28Z")

</div>

file\_column does not handle inconsistency between the database and  
filesystem well.

If I define an url\_for\_image\_column like this:

url\_for\_image\_column(  
@ad.images.first,  
“image”,  
{  
:geometry =\> “120x90”,  
}  
)

It returns a wellformed url for the resized image.

BUT if I accidentally delete the image-file from the filesystem (in the  
folder public/image/etc…), the above code results in a a NoMethodError

NoMethodError in User#welcome  
Showing app/views/shared/\_ad\_list\_frame\_dog\_sell.rhtml where line #60  
raised:

You have a nil object when you didn’t expect it!  
You might have expected an instance of Array.  
The error occurred while evaluating nil.split

What is the problem?
