I have an issue, I use capistrano to deploy my rails app. I now want to add in personal avatar's to my forum. I am using a hacked up version of Beast and I can't stand "Gravatar.com". So here is my issue. I am not sure if storing all those images in the db is going to be a problem down the road as now it is just an avatar but later or even sooner it will be pictures within the posts and other uploaded pictures. I can't see using the file system because every new capistrano deployment creates an entirely new tree for the app and all my images would be stored in the previous version so I don't see that working. Has anyone else delt with this successfully?
Also, I see how I can use the send_data method to view the image that is in my database on the page but that overwrites the entire page so how do you view a n image in a page that is from the db?
For the uploaded image storage and capistrano you can just store the images in the shared directory. The shared directory does not get overwritten and therefore is a good place to put the uploaded files directory. You can add this to your include path in the environment files using the environment specific file to put a machine specific path to the directory.