Preserving upload directories on cap deployment

I am not totally sure how to do this. Obviously I would want to create
some sym links to the directories outside the project, so where do you
guys find the best place to place the folders is (ex.
/project_uploads/[project_name]) ?

Or is there a better way, ie. moving items through capistrano?


This is what I have done. Not sure if it is the best way, but it works

desc “Sync the uploads to the new current project”
task :sync_uploads, :roles => [:app] do
run “mkdir -p #{shared_path}/uploads”
run “chown #{user}:#{user} #{shared_path}/uploads/”
run “ln -nsf #{shared_path}/uploads #{current_path}/public/uploads”

I just make sure the uploads are saved in system/uploads/ (the system
folder symbolic link is made my capistrano). That way I don’t have to
worry about putting it in my deploy.rb file.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs