# Problems with validates\_presence\_of...anybody?

**URL:** <https://www.ruby-forum.com/t/problems-with-validates-presence-of-anybody/55584>\
**Category:** Rails\
**Created:** [March 22, 2006, 8:11am UTC](https://www.ruby-forum.com/t/problems-with-validates-presence-of-anybody/55584 "2006-03-22T08:11:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnpetterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Post date:** [March 22, 2006, 8:11am UTC](https://www.ruby-forum.com/t/problems-with-validates-presence-of-anybody/55584/1 "2006-03-22T08:11:33Z")

</div>

Hello everybody,  
I have been developing small applications in Rails from quite some time.  
But lately, I came across a bug which I have not been able to correct.  
If anybody could help me with it, would be of great help thankyou.

Actually, the problem is that I have a form in my application with some  
set of fields.  
Now what “validates\_presence\_of” should do is that if I submit the form  
without entering the fields should raise an error.

But instead its giving me an error :

Errno::EISDIR in Users#create

Is a directory - script/…/config/…/public/files/

And yes, I forgot to mention that I am also uploading a file in my  
application. And that file is being stored in {RAILS\_ROOT}/public/files/  
If anybody could help me. Please.  
Thankyou.

---

<div class="post-metadata">

**Author:** ![johnpetterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Post date:** [March 24, 2006, 6:30am UTC](https://www.ruby-forum.com/t/problems-with-validates-presence-of-anybody/55584/2 "2006-03-24T06:30:27Z")

</div>

John Petterson wrote:

> Hello everybody,  
> I have been developing small applications in Rails from quite some time.  
> But lately, I came across a bug which I have not been able to correct.  
> If anybody could help me with it, would be of great help thankyou.
> 
> Actually, the problem is that I have a form in my application with some  
> set of fields.  
> Now what “validates\_presence\_of” should do is that if I submit the form  
> without entering the fields should raise an error.
> 
> But instead its giving me an error :
> 
> Errno::EISDIR in Users#create
> 
> Is a directory - script/…/config/…/public/files/
> 
> And yes, I forgot to mention that I am also uploading a file in my  
> application. And that file is being stored in {RAILS\_ROOT}/public/files/  
> If anybody could help me. Please.  
> Thankyou.

I guess this was left unnoticed.  
If anybody could help.

---

<div class="post-metadata">

**Author:** ![johnpetterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Post date:** [March 24, 2006, 9:59am UTC](https://www.ruby-forum.com/t/problems-with-validates-presence-of-anybody/55584/3 "2006-03-24T09:59:00Z")

</div>

sounds like your script trying to upload the file to  
{RAILS\_ROOT}/public/files/ because no file.

Have you seen file\_column ? it simplifies and its own validations come  
so handy [http://www.kanthak.net/opensource/file\_column/](http://www.kanthak.net/opensource/file_column/)

Gokhan  
[www.sylow.net](http://www.sylow.net)

---

<div class="post-metadata">

**Author:** ![johnpetterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Post date:** [March 25, 2006, 7:08am UTC](https://www.ruby-forum.com/t/problems-with-validates-presence-of-anybody/55584/4 "2006-03-25T07:08:43Z")

</div>

Gokhan A. wrote:

> sounds like your script trying to upload the file to  
> {RAILS\_ROOT}/public/files/ because no file.
> 
> Have you seen file\_column ? it simplifies and its own validations come  
> so handy [http://www.kanthak.net/opensource/file\_column/](http://www.kanthak.net/opensource/file_column/)
> 
> Gokhan  
> [www.sylow.net](http://www.sylow.net)

Thanks for that  
But I am dobtful as to whether it will work for documents?  
I am trying to upload a .doc file?
