# Paperclip images are not stored in my directory

**URL:** <https://www.ruby-forum.com/t/paperclip-images-are-not-stored-in-my-directory/222230>\
**Category:** Rails\
**Created:** [August 18, 2012, 7:18am UTC](https://www.ruby-forum.com/t/paperclip-images-are-not-stored-in-my-directory/222230 "2012-08-18T07:18:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 18, 2012, 7:18am UTC](https://www.ruby-forum.com/t/paperclip-images-are-not-stored-in-my-directory/222230/1 "2012-08-18T07:18:44Z")

</div>

It is my User.rb model,  
My images are not stored in my assets directory…

has\_attached\_file :photo, :styles =\> { :small =\> “100x100#”, :large =\>  
“500x500\>”, :thumb =\> “60x60\>” },  
:url =\>  
“/assets/users/:id/:style/:basename.:extension”,  
:path =\>  
“:rails\_root/public/assets/users/:id/:style/:basename.:extension”

validates\_attachment\_presence :photo  
validates\_attachment\_size :photo, :less\_than =\> 5.megabytes  
validates\_attachment\_content\_type :photo, :content\_type =\>  
[‘image/jpeg’,  
‘image/png’]

Please advice me…

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 18, 2012, 9:39pm UTC](https://www.ruby-forum.com/t/paperclip-images-are-not-stored-in-my-directory/222230/2 "2012-08-18T21:39:45Z")

</div>

Without digging too deep, I’ve never seen :rails\_root before, could you  
mean  
“#{Rails.root/public/assets/users/:id/:style/:basename.:extension}”?  
(in Rails 3).

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 19, 2012, 5:51pm UTC](https://www.ruby-forum.com/t/paperclip-images-are-not-stored-in-my-directory/222230/3 "2012-08-19T17:51:58Z")

</div>

On Saturday, 18 August 2012 01:17:51 UTC-4, Maddy wrote:

> 

I’d recommend a name other than ‘assets’ for this directory - the asset  
pipeline uses that URL, so you’re likely to get strange behavior  
(especially in development mode) if you use it as well.

Other than that, you’ll need to provide more detail about what happens,  
any  
error messages, etc. The uploaded files clearly go _somewhere_…

–Matt J.
