I had written some code that stores some uploads in /public/files/ and they get lost during deployment.
Should I modify the deploy.rb or just copy the files to my local svn directory?
The good news is that your uploads aren’t gone. They’re residing in one of the previous release folders. This article explains the process of managing uploads with Capistrano better than I ever could:
http://www.simonecarletti.com/blog/2009/02/capistrano-uploads-folder/
Thanks I’ll take a look at the article. I already moved the files for now, using ssh.
After looking at the article it looks like I might have a one line fix.
I made a folder /opt/ublip/rails/shared/uploads and copied the current bunch of image files in it
inside of deploy.rb there’s ablock that starts with
task :symlink_configs
if I add this
ln -nfs #{shared_path}/uploads #{release_path}/public/files
that should solve my problem. Right???
Worked fine when I deployed, I guess I answered my own question.
Yeah. So you did the symlink similar to the way we do symlinks for database.yml and mongrel_cluster.yml. Good idea.